window.location.reload(true) should install Service Workers in "waiting" state
Reported by
jwajsb...@mozilla.com,
Aug 3 2016
|
||
Issue descriptionUserAgent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101 Firefox/49.0 Steps to reproduce the problem: I'm working with service workers and especially playing with how to update them. I understand that simply reloading a page won't activate the worker in "waiting" state and keep the older one, but that shift-reloading it will activate it. Now I tried to replicate this using location.reload. What is the expected behavior? Here is what I expected: location.reload() => would not activate the new worker. location.reload(true) => would activate the new worker. Indeed the argument controls the "forceReload" option. In my mind, this would be the same as shift-reloading. What went wrong? Alas, location.reload(true) doesn't activate the new worker. Did this work before? No Chrome version: 54.0.2816.0 (Official Build) dev (64 bits) Channel: dev OS Version: Debian Stable Flash Version: Shockwave Flash 11.2 r202
,
Aug 3 2016
Does blink even implement the forceReload argument to window.location.reload()? If I open a page and type it into the chrome devtools I get a normal reload. The network timeline does not show it bypassing the http cache.
,
Aug 3 2016
Where is the forceReload argument even specified? I don't see it in the HTML spec (https://html.spec.whatwg.org/multipage/browsers.html#dom-location-reload). But no, our IDL doesn't have any arguments to the reload method, matching the spec.
,
Aug 3 2016
Right, I took this from MDN [1] but it's not in the living standard nor in the HTML5 standard. I don't know where they took it and I didn't check in the standard when I filed the bug. I guess this makes this bug invalid... [1] https://developer.mozilla.org/en-US/docs/Web/API/Location/reload
,
Aug 3 2016
,
Aug 3 2016
Yea, and Boris's comment in the webidl sums it up pretty well: // XXXbz there is no forceget argument in the spec! See bug 1037721.
,
Aug 5 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by mattm@chromium.org
, Aug 3 2016