Re: [w3c/ServiceWorker] Auto-cache imported scripts (#908)

yoshisatoyanagisawa left a comment (w3c/ServiceWorker#908)

tl;dr we can close this as already fixed.

I did further more investigation.
A browser keeps ServiceWorkerRegistrations persistently.
https://w3c.github.io/ServiceWorker/#service-worker-registration-lifetime

ServiceWorkerRegistrations has set of ServiceWorkers
https://w3c.github.io/ServiceWorker/#dfn-service-worker-registration

ServiceWorker has an associated global object
https://w3c.github.io/ServiceWorker/#dfn-service-worker-global-object

The global object has an associated module map.
https://w3c.github.io/ServiceWorker/#serviceworkerglobalscope
https://html.spec.whatwg.org/multipage/workers.html#concept-workerglobalscope-module-map

Since the module map keeps imported scripts, module scripts should also be auto cached.
https://html.spec.whatwg.org/multipage/webappapis.html#module-map

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

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

Received on Friday, 3 October 2025 00:59:31 UTC