- From: Jake Archibald <notifications@github.com>
- Date: Wed, 10 Jan 2018 04:54:17 -0800
- To: w3c/ServiceWorker <ServiceWorker@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 10 January 2018 12:59:59 UTC
> Or maybe I could deploy another version with a service worker that has the only function that deletes all previous cache and unregisters previous service worker, if that's possible? That's the answer you're looking for! Replace the old service worker with one that unregisters itself: ```js registration.unregister().then(async () => { // optionally, get controlled pages to refresh: for (const client of await clients.matchAll()) { client.navigate(client.url); } }); ``` All you need to do is deploy the above at the same location as the current service worker. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/ServiceWorker/issues/1258#issuecomment-356594087
Received on Wednesday, 10 January 2018 12:59:59 UTC