You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Which location should reload on history.go(0)? #2436
When the go(delta) method is invoked, if delta is zero, the user agent must act as if the location.reload() method was called instead.
This is ambiguous as to which location should be used, the one for the window whose history is being accessed, or the current document. Unfortunately, different browsers behave differently, as shown by:
Under FF, this will loop forever reloading (because the main document is reloaded) whereas in Chrome it will terminate (because the child is reloaded).
Well it's related to #1454, but orthogonal. Currently the spec special-cases history.go(0), it's the only history traversal that reloads documents that haven't been discarded.
Activity
asajeffrey commentedon Mar 14, 2017
cc @annevk
asajeffrey commentedon Mar 14, 2017
IRC chat on #servo with @KiChjang and @bzbarsky: http://logs.glob.uno/?c=mozilla%23servo&s=14+Mar+2017&e=14+Mar+2017#c630800
"The problem is that if you call childWindow.go(0), what if you are same-origin with the child, but x-origin with the parent?"
annevk commentedon Mar 15, 2017
This basically depends on #1454 being fixed I think.
asajeffrey commentedon Mar 15, 2017
Well it's related to #1454, but orthogonal. Currently the spec special-cases
history.go(0), it's the only history traversal that reloads documents that haven't been discarded.annevk commentedon Mar 16, 2017
But making history more of a flat concept should help a lot with deciding what to reload I think.
annevk commentedon May 4, 2017
This is also related to #2018 (should history return cross-origin information).
Test which document history.go(0) reloads
Test which document history.go(0) reloads
Test which document history.go(0) reloads
Test which document history.go(0) reloads
Test which document history.go(0) reloads
Bug 1794371 [wpt PR 36366] - Test which document history.go(0) reload…
Bug 1794371 [wpt PR 36366] - Test which document history.go(0) reload…
Bug 1794371 [wpt PR 36366] - Test which document history.go(0) reload…