Re: [w3c/ServiceWorker] Service worker expiration (#1480)

We talked about removing service workers on 404 in https://github.com/w3c/ServiceWorker/issues/204#issuecomment-342658175.

> If someone buy the same domain name later and adds a website without a service-worker

This isn't a problem for service workers only. It's also an issue with cookies and origin storage. The overall solution is https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Clear-Site-Data.

If you want to target service workers specifically, requests for service worker scripts are sent with a `Service-Worker: script` header. Servers could react to that and serve a service worker which uninstalls itself.

We did a stupider version of this on the Chrome Dev Summit website, where any 404 ending in `.js` serves a self-destructing service worker: https://developer.chrome.com/devsummit/does-not-exist.js

-- 
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/1480#issuecomment-547770990

Received on Wednesday, 30 October 2019 07:27:05 UTC