[Webkit-unassigned] [Bug 187435] "serviceworker.js" is fetched several times in a row

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 9 09:54:25 PDT 2018


Chris Dumez <cdumez at apple.com> changed:

           What    |Removed                     |Added
                 CC|                            |ggaren at apple.com

--- Comment #5 from Chris Dumez <cdumez at apple.com> ---
(In reply to Chris Dumez from comment #4)
> (In reply to youenn fablet from comment #3)
> > As per service worker spec, every time a navigation load happens (a page or
> > an iframe is loaded), the service worker script is fetched, so this
> > repetitive loads could actually happen.
> > I would expect 304 though, not 200, and it seems suspicious that only
> > Safari/iOS would behave this way.
> > Nuno, is there a web site where we could repro this case?
> Note that by default, service workers script fetches bypass the HTTP cache,
> as per the specification. We actually reported a bug against the
> specification about this but this behavior was apparently intentional.
> As a Web developer, you can opt into using the HTTP cache by using
> {updateViaCache: "all" } as options when registering your service worker.

Spec says:
If request is a non-subresource request, or request is a subresource request and the time difference in seconds calculated by the current time minus registration’s last update check time is greater than 86400, invoke Soft Update algorithm with registration.

And Soft update is defined at https://w3c.github.io/ServiceWorker/#soft-update.

The way I understand the specification, the "last update check time is greater than 86400" check only applies to sub resource loads, not main resource requests. Although it could be me misunderstanding the spec.

I personally, really do not like this behavior though.

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/20180709/e36b7d99/attachment-0001.html>

More information about the webkit-unassigned mailing list