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

Putting updateViaCache on the registration seems fine to me. We're registering or updating a registration's state. So, such processes using the last value of the registration seems good. If it had been on each service worker, the values used for the installation of existing workers wouldn't have been changed anyway.

I think this property should be live as the other properties though. The spec currently doesn't update the value in Update algorithm, but I think the value should be updated by referencing job's update via cache mode before fetching.

The expected behavior that I think of is:

```js
var reg = await navigator.serviceWorker.getRegistration(url);
reg.updateViaCache;  // 'all';
var r = await register(sw, {updateViaCache: 'none'});
reg === r;  // true
reg.updateViaCache; // 'none'
r.updateViaCache; // 'none'
```

I think the update via cache mode isn't part of the identity of a registration but just a strategy clients set. WDYT?

-- 
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-329389105

Received on Thursday, 14 September 2017 06:45:33 UTC