Reputation: 8874
I can't seem to find in any documentation when my service worker will be updated?
Does it check for a new service worker file every time it is started, or once per day, or something else?
Upvotes: 3
Views: 167
Reputation: 10782
By default it's checked every time the page is opened (https://github.com/slightlyoff/ServiceWorker/blob/master/explainer.md#updating-a-serviceworker).
You can force a check with the ServiceWorkerRegistration.update method, that bypasses the HTTP cache if the previous check was more than one day ago.
Upvotes: 5