Next button only works after reload
-
The next button would be incredibly useful if it worked reliably, but it's greyed out on pages where it should be available. For example it's only functional in a Vivaldi forum board overview, if I reload the page once. Even after reload it doesn't work in threads itself. Anyone can confirm this? Should it even work?
osx 10.11.6, snapshot 1.10.856.16
-
I can confirm this. It appears that the need to reload is a result of a problem that on sites like this forum, that act fancy and do a "smooth load" -- that is, they avoid full page loads when people click same-domain links (this is achieved by javascript doing a
preventDefault()
to block the normal HTTP GET requesting, AJAX to request content to replace just part of the page and usually not the navbar, andhistory.pushState(...)
to change the URL to the expected URL) -- after the history.pushState(), the browser doesn't rescan the page for a suitable link to use for the Fast Forward button.You can confirm this by opening https://forum.vivaldi.net/category/82/team-blog in a new tab and running in your DevTools console the command
history.pushState({}, "", "/not_a_real_page");
The Fast Forward button gets cleared of its old link, https://forum.vivaldi.net/category/82/team-blog?page=2, but it doesn't get the new link it should retrieve again from
<link rel="next" href="https://forum.vivaldi.net/category/82/team-blog?page=2">
Actually, I see that there is a bug in the Vivaldi Forum, that when a "smooth load" is done, the next and prev LINK elements in the header are not updated. So if Vivaldi actually rescanned the
<link rel="next"... />
, it would actually still be the unchanged old link.If that's a bug afflicting many other pushState()-employing sites as well, perhaps Vivaldi shouldn't believe
<link rel="next"... />
elements after a pushState() has occurred, but Vivaldi draws on at least one other thing for the Fast Forward button -- seeing if there's a link with the word "Next" in it -- so it could still employ that. -
@Isildur Nice troubleshooting... and unfortunately that "Next" logic also gets a bit confused on sites like this one:
http://www.dslreports.com/forums/1 -