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
Reloads on history navigations (after a nav limit or error) always occur after the url has already been set to the new page. Typically this is not an issue, but if the url contains a hash, the browser ignores the call to 'window.location.href'.
When reloading a URL that contains a hash (e.g. `/page#target`) after an error,
assigning to `window.location.href` is not enough. Explicitly call
`window.location.reload()` to ensure a reload happens.
Closesyoutube#377.
The previous change explicitly called `window.location.reload()` after assigning
to `window.location.href` to ensure a reload happens for URLs that contain a
hash. However, an immediate call to `window.location.reload()` will cancel
navigation started by the assignment to `window.location.href` for other cases.
Fix this by limiting calls to `window.location.reload()` for only those cases
where it is needed.
Fixesyoutube#377
The previous change explicitly called `window.location.reload()` after assigning
to `window.location.href` to ensure a reload happens for URLs that contain a
hash. However, an immediate call to `window.location.reload()` will cancel
navigation started by the assignment to `window.location.href` for other cases.
Instead, check whether the new URL will trigger a navigation first. Adjust
the navigable-check function to account for hash URL to standard URL transitions
(e.g. `/page#target` to `/page`) and update the tests.
Fixesyoutube#377
Reloads on history navigations (after a nav limit or error) always occur after the url has already been set to the new page. Typically this is not an issue, but if the url contains a hash, the browser ignores the call to 'window.location.href'.
For example.
window.location.href = 'https://www.google.com/#foo';
Nothing occurs. We probably need to follow the location.href change with a call to location.reload.
The text was updated successfully, but these errors were encountered: