[w3c/ServiceWorker] Service worker registration when context doing the registration goes away (Issue #1781)

youennf created an issue (w3c/ServiceWorker#1781)

Let's say a document is starting to register a service worker and is quickly going away before the service worker script is loaded.
Given the document is the fetch request client, it is expected that the service worker script fetch is terminated as the document is aborted. It then follows that the service worker never gets registered.

This can be tested in https://github.com/WebKit/WebKit/blob/main/LayoutTests/http/wpt/service-workers/register-then-reload.html.
Safari follows the spec (or my interpretation of the spec at least), while Chrome and Firefox seem to continue the fetching of the script and the registration of the service worker.

We should try to converge implementations and clarify the specification.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1781
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/ServiceWorker/issues/1781@github.com>

Received on Friday, 4 July 2025 13:55:19 UTC