youtube / spfjs

A lightweight JS framework for fast navigation and page updates from YouTube
https://youtube.github.io/spfjs/
MIT License
2.23k stars 147 forks source link

Reload attempts to a url with a hash do nothing. #377

Closed DavidCPhillips closed 8 years ago

DavidCPhillips commented 8 years ago

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. 1) Navigate to 'https://www.google.com/#foo' 2) Execute: 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.