[w3c/ServiceWorker] Should register() trigger an update if only updateViaCache changes? (#1414)

Spinning off the discussion at https://github.com/w3c/ServiceWorker/pull/1411

The current spec has the following characteristics:
* If register() changes only updateViaCache (not the script url), it triggers a byte-for-byte update check. Therefore it may or may not install a new service worker.
* If the register() promise resolves, the registration takes the new value of updateViaCache. But if it rejects, the value is unchanged. Therefore, updateViaCache may or may not change.

It may be cleaner if updateViaCache is treated as just a setting, and it doesn't itself trigger the byte-for-byte update check. That is, a register() call that changes only updateViaCache will immediately change the property, and resolve.

According to WPT (registration-updateviacache.https.html), Safari and Firefox implement the current spec in that they trigger an update. A test for register() rejecting was just added to that file and I don't know the results yet.

What do people think?  @aliams @asutherland @wanderview @youennf @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/1414

Received on Monday, 3 June 2019 08:11:38 UTC