Re: [w3c/ServiceWorker] Does changing updateViaCache mint a new ServiceWorkerRegistration or update them all? (#1189)

Ok, so I'm just completely wrong and should probably go jump in a lake.  We do what @jungkees suggested in https://github.com/w3c/ServiceWorker/issues/1189#issuecomment-329389105.

I wrote a glitch to test what we currently do:

  https://sw-change-updateviacache.glitch.me/

Which on current firefox nightly 57 produces:

```
==> service worker script evaluation
==> reg1.updateViaCache: imports
==> service worker script event: install
==> service worker script event: activate
==> reg2.updateViaCache: none
==> reg1 === reg2: true
==> reg2.installing: null
==> reg2.waiting: null
==> reg2.active: [object ServiceWorker]
```

So we don't create a new registration.  We also don't create a new ServiceWorker.

Looking at our code, though, I do think we trigger an update check at this point.  We don't do the short circuit, but our update doesn't find any changes and just keeps the current service worker.

-- 
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/1189#issuecomment-329803700

Received on Friday, 15 September 2017 14:46:58 UTC