Build multiple Progressive Web Apps on the same domain

Chase Phillips
Demián Renzulli
Demián Renzulli
Matt Giuca
Matt Giuca

In the Progressive Web Apps in multi-origin sites blog post, Demian discussed the challenges that sites built on multiple origins face when trying to build a single Progressive Web App that encompasses all of them.

An example of this type of site architecture is a ecommerce site where:

  • The home page is at https://www.example.com.
  • The category pages are hosted at https://category.example.com.
  • The product detail pages at https://product.example.com.

As discussed in the article, the same-origin policy imposes several restrictions, preventing the sharing of service workers, caches, and permissions across origins. For that reason, we strongly recommend avoiding this type of configuration and for those that already have sites built in this way, to consider migrating to a single origin site architecture whenever possible.