Re: [w3c/ServiceWorker] A way to immediately unregister a service worker (#614)

Unfortunately I cannot seem to directly test out `Clear-Site-Data` because of the [chrome bug]( https://bugs.chromium.org/p/chromium/issues/detail?id=898465), and the header doesn't seem to work at all in Firefox. I did however test by manually unregistering and refreshing, which works just as you say it does.

However, I'm still not able to connect the dots on how this works according to the spec.

> When you reload after the clearing steps have run, there isn't a registration active

I must be misreading the spec, as my understanding of the spec is that [`unregister()`](https://w3c.github.io/ServiceWorker/#navigator-service-worker-unregister) doesn't actually remove the registration until all clients `unload`, and [`.reload()`](https://html.spec.whatwg.org/multipage/history.html#dom-location-reload) (which is what [Clear-Site-Data](https://www.w3.org/TR/clear-site-data/#clear-response) calls under the hood) doesn't actually cause the client to `unload`.

-- 
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/614#issuecomment-432655959

Received on Wednesday, 24 October 2018 13:29:44 UTC