New issue
Advanced search Search tips

Issue 633993 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Aug 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

window.location.reload(true) should install Service Workers in "waiting" state

Reported by jwajsb...@mozilla.com, Aug 3 2016

Issue description

UserAgent: 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
 

Comment 1 by mattm@chromium.org, Aug 3 2016

Components: Blink>ServiceWorker

Comment 2 by bke...@mozilla.com, 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.

Comment 3 by mek@chromium.org, 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.
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

Comment 6 by bke...@mozilla.com, 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.
Status: WontFix (was: Unconfirmed)

Sign in to add a comment