Re: [w3c/ServiceWorker] Immediate Service Worker (#1389)

I realized the described corner case when executing `ServiceWorkerGlobalScope.skipWaiting()` could be eliminated if deleting the old cache is not triggered on activating the new Service Worker version. If Clients.claim() is not invoked, the old tab could serve old version files.

The currently used removing outdated caches on activating new SW version is taken from here: https://developers.google.com/web/ilt/pwa/caching-files-with-service-worker#removing_outdated_caches

In my app every SW version is linked to new cache. So I could delete the exact cache for every SW version when this SW version is deactivated/unistalled.

However, currently there is no uninstall (or deactivate) event.


-- 
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/1389#issuecomment-466824224

Received on Sunday, 24 February 2019 22:29:58 UTC