Is it possible to have multiple service workers?

Technology CommunityCategory: PWAIs it possible to have multiple service workers?
VietMX Staff asked 3 years ago

There’s two things to keep in mind here:

  • It’s possible to register an arbitrary number of service workers for a given origin, as long as each service worker has its own unique scope
  • The Cache Storage API (and other storage mechanisms, like IndexedDB) are shared throughout the entire origin, and by default there’s no “sharding” or namespace segregation.