Service worker updates
Updating the service worker file can be a tricky concept as well. There are several factors that determine when your service worker is updated. The update cycle does not start until the browser determines that there is a new service worker file available.
Once a service worker is registered, the browser treats the file like any other file when determining if there is a new version available. It makes a request to the server, which triggers a well-known cycle.
First, there is the local browser cache (not the service worker cache) for the file. If there is a local version available that has not become stale, it is retrieved. Next, the request is sent across the network to the server. If the server responds with a 304, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access