From bb52fbc5b76b66643513883e7e5e04c9cdce083f Mon Sep 17 00:00:00 2001 From: Jungkee Song Date: Tue, 25 Feb 2020 16:04:13 -0800 Subject: [PATCH] Use Purge Service Worker Registrations for storage 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: https://github.com/w3c/webappsec-clear-site-data/issues/54. Service Workers issue: https://github.com/w3c/ServiceWorker/issues/614. Service Workers PR: https://github.com/w3c/ServiceWorker/pull/1506. --- index.src.html | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/index.src.html b/index.src.html index 1f4dfb1..e3ebf3c 100644 --- a/index.src.html +++ b/index.src.html @@ -628,11 +628,7 @@

1. [=delete a database|Delete=] |database|. - 4. For each |registration| in the user agent's set of service worker registrations: - - 1. If |registration|'s scope URL's [=url/origin=] is |origin|: - - 1. Execute {{ServiceWorkerRegistration/unregister()}} on |registration|. + 4. Invoke [=Purge Service Worker Registrations=] with |origin| and true. 5. For each |appcache| in the user agent's set of [=application caches=]: