[Webkit-unassigned] [Bug 183086] ServiceWorkerRegistration.onupdatefound not called after reload

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Feb 24 10:16:33 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=183086

Chris Dumez <cdumez at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Chris Dumez <cdumez at apple.com> ---
register() [1] says to call Start Register [2]. This schedule a Register [3] job. Step 5.3. says:
"""
If newestWorker is not null, job’s script url equals newestWorker’s script url, and job’s update via cache mode's value equals registration’s update via cache mode, then:

Invoke Resolve Job Promise with job and registration.
Invoke Finish Job with job and abort these steps.
"""

This is what we do here. In your example, you merely register. There is already a registration with same scope / scriptURL and the updateViaCache mode is the same, so we return this registration without updating.

We behave as per spec.

An update would happen if the script explicitly calls update(), or when the service worker intercepts a load (due to Soft Update [4]).

If Chrome behaves differently then the spec does not match Chrome. We may want to file a bug against the spec (or Chrome?).

[1] https://w3c.github.io/ServiceWorker/#navigator-service-worker-register
[2] https://w3c.github.io/ServiceWorker/#start-register
[3] https://w3c.github.io/ServiceWorker/#register-algorithm
[4] https://w3c.github.io/ServiceWorker/#soft-update-algorithm

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180224/2a36b44c/attachment.html>


More information about the webkit-unassigned mailing list