Re: [ServiceWorker] "unload" event and Service Workers (#731)

The defining feature of service workers is arguably that they can live without an active browsing context.  An arbitrary "kill the SW if the browsing context goes away" rule seems to fly in the face of this design.

I suppose a UA could decide to terminate a fetch event or message event .waitUntil() if the browsing context goes away, though.  Another event, like push, may still be holding the service worker alive, though, so its not a guarantee of stopping the script.

---
Reply to this email directly or view it on GitHub:
https://github.com/slightlyoff/ServiceWorker/issues/731#issuecomment-131873715

Received on Monday, 17 August 2015 16:03:45 UTC