-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normative spec doesn't necessarily terminate service workers #54
Comments
FWIW, I've tested Clear-Site-Data: |
For the spec language, I think we should use:
Note that w3c/ServiceWorker#1415 moves the map entry removal step out of Clear Registration. So we need it to be merged before using the above steps. |
So that the Clear Site Data spec can reference the algorithm and use it to clear out the service worker, insteaed of unregister(). Context: w3c#614 (comment) Eventually will resolve: w3c/webappsec-clear-site-data#54
Clear-Site-Data: "storage" has used Service Workers' unregister() as Service Workers' had no external algorithm that allows immediate purging of the service worker registrations. This change calls into Purging Service Worker Reigstration algorithm defined in Service Workers with the origin and intention to unclaim the controlled clients when "storage" directive is specified. Issue: w3c#54. Service Workers issue: w3c/ServiceWorker#614. Service Workers PR: w3c/ServiceWorker#1506.
We noticed that as of WebKit build 171 Safari now passes all of the tests in https://github.com/web-platform-tests/wpt/blob/master/clear-site-data/storage.https.html which includes causing controlled pages to become uncontrolled, consistent with the cluster of issues associated with this one. I can confirm for Firefox/Gecko that we believe the test behavior (and what's been proposed in this cluster) seems appropriate and consistent with previous discussions in the ServiceWorkers WG about CSD being an emergency kill-switch for ServiceWorkers, etc. and that we should go ahead with the spec changes to normalize this. @youennf @cdumez From the reference to this issue in WebKit/WebKit#14032 and the decision to land the underlying WebKit change, I assume WebKit also believes we should specify the behavior of making controlled clients become uncontrolled? |
I don't think the normative behavior of the
storage
directive provides the guarantees stated in the non-normative language, specifically around service workers.From what I can tell, the spec says to simply call
unregister()
on every service worker registration for the matching origin.unregister()
doesn't actually take effect until no client is using the registration. Even ifreloading()
did create a point in time in which the client was notusing
the registration, I'm not sure that iterating over each client and callingreload()
will guarantee that there was a point in time in which no client wasusing
the registration. Perhaps the Clear Registration algorithm should be invoked directly?Original discussion: w3c/ServiceWorker#614
Related ticket: #1
The text was updated successfully, but these errors were encountered: