Re: [w3c/ServiceWorker] resurrected service workers don't fire an activate event which may break expectations (#1204)

>From JS perspective is sounds like ServiceWorker is being removed completely and then added again. I mean, that's certainly unexpected, especially if that worker doesn't control anything anymore (if I got it right) and isn't showing in any API to be alive.

I is how I think it's working (I haven't thought much uninstalling process before):

* SW registered
* Pages loaded (3 for example)
* SW is unregistered in tabs 3
* Browser calls redundant for active worker
* Worker doesn't go away (as you said), but keeps controlling current pages
* Redundant worker doesn't receive control of new tabs
* When another tabs calls register(), even with same params, new SW is created and starts normal live cycle events
* On active, it new SW claims all current tabs and steals them from redundant worker

Much like an update, but with a redundant _(irony)_ step of unregistration.

-- 
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/1204#issuecomment-334898183

Received on Saturday, 7 October 2017 00:33:58 UTC