Create Topic

WP Tavern Forums Create Topic

Create New Topic

Weston Ruter

Rick:
You can only have one service worker running at a time, and the first service worker to handle a `fetch` event will cause any other handlers to be skipped. So yes, only one service worker can manage the network request for a given URL. But a service worker could/should be conservative in the assets it caches, allowing multiple themes/plugins to control the caching for their own assets. But a service worker can do more than just manage the network. It can also manage notifications and do new things like background sync. So the ability for multiple themes/plugins to introduce their own respective JS code to include in the service worker is useful, and it needs a core API to facilitate it (by concatenating them together) since only one service worker can be installed at a time.






Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.