Re: [w3c/ServiceWorker] Handling duplicate importScripts() (#1041)

While working on this issue, I found out a point that the spec and the implementation (Chromium) don't agree.

The spec says each service worker has its own script resource and the related imported script resource map tacked on it. In Chromium, the service worker versions seem to share the same script resource cache (i.e. the disk cache implementation.) If my understanding is correct, the spec and the implementation have different behavior for update:

Let's say scope1 client and scope2 client have different scope but share the same script. They registered the SW. When scope1 client detected and updated the SW and scope2 client tries to update the SW later, the spec will make it proceed to Install as it figure it out as a different resource. On the other hand, the implementation won't trigger Install and return early treating them byte identical resources.

I'd like to hear from implementers and sort out the desired behavior we originally expected.

/cc @mattto @slightlyoff @wanderview @aliams @cdumez @jakearchibald 

-- 
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/1041#issuecomment-369798743

Received on Friday, 2 March 2018 02:21:59 UTC