-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"update the session history with the new page" for a page reload or location.reload() #1578
Comments
Hmm. This does look like a spec bug to me, but I'd like @annevk to confirm. To reiterate what the OP posted:
I am a bit worried about what could have gone wrong here since the spec seems pretty explicit that "If the navigation was initiated for entry update of an entry" cannot be true if replacement is enabled: it has a non-normative note saying:
I wonder if "update the session history with the new page" is not supposed to be invoked here? Maybe something got lost in the recent refactoring... |
Looking through https://whatwg.org/specs/web-apps/2009-10-27/ I think this has always been wrong. I suspect |
I think so |
@annevk, can you help fix this, or check my proposed fix? I think what you're saying is that:
Is that right? |
Yeah, I think that's right based on what @smaug---- confirmed above. |
Fixes #1578. When performing a reload via location.reload() or a user interface element, it seems more correct to go down the "entry update" path, instead of going down the normal path and turning on "replacement enabled". The normal path wipes out all session history entries after the current one, which is not what browsers do when reloading.
Fixes #1578. When performing a reload via location.reload() or a user interface element, it seems more correct to go down the "entry update" path, instead of going down the normal path and turning on "replacement enabled". The normal path wipes out all session history entries after the current one, which is not what browsers do when reloading.
Fixes #1578. When performing a reload via location.reload() or a user interface element, it seems more correct to go down the "entry update" path, instead of going down the normal path and turning on "replacement enabled". The normal path wipes out all session history entries after the current one, which is not what browsers do when reloading.
Fixes whatwg#1578. When performing a reload via location.reload() or a user interface element, it seems more correct to go down the "entry update" path, instead of going down the normal path and turning on "replacement enabled". The normal path wipes out all session history entries after the current one, which is not what browsers do when reloading.
https://html.spec.whatwg.org/multipage/browsers.html#dom-location-reload
It says
https://html.spec.whatwg.org/multipage/browsers.html#update-the-session-history-with-the-new-page
In the step 2, it says
Should we assume
Navigate with replacement enabled
means the case ofnavigation was initiated for entry update
here?In the spec,
navigation was initiated for entry update
is referenced only from history traversal algorithm that isn't for reload.If we follow the latter
Otherwise
case for reload, UA needs to remove all succeeding entries from the session history. That isn't a behavior existing UAs implement and users expect.The text was updated successfully, but these errors were encountered: