IIRC, Turbolinks work by loading pages in the background in response to a mouseover event - by the time a click has registered, the remote content has already been downloaded and just needs to be injected into the page. The speed-up comes from anticipating clicks, not from JavaScript tomfoolery.
Re:Browsers are pretty good at loading pages
by pmontra on Monday July 22, 2019 @01:22AM
(#20495504)
I checked the README and it never mentions mouseover
> Turbolinks intercepts all clicks on <a href> links to the same domain. When you click an eligible link, Turbolinks prevents the browser from following it. Instead, Turbolinks changes the browser’s URL using the History API, requests the new page using XMLHttpRequest, and then renders the HTML response.
I don't have a Turbolinks application to check but I found this https://github.com/turbolinks/turbolinks/issues/313
and this
https://www.mskog.com/posts/instant-page-loads-with-turbolin...
The behavior you describe is possible but it's not the default and requires adding other libraries.
Re:Browsers are pretty good at loading pages
by csande17 on Monday July 22, 2019 @01:53AM
(#20495622)
I think you're thinking of https://instant.page/ , which is pretty much as simple as "when link is moused over, tell browser to load the page in the background".
But sites were small and even loading all the page again was not that bad.
By the way, Rails Tutbolinks [1] are a way to get the same result with the server rendering only the html body and the js code in the browser swapping it with the current one.
[1] https://github.com/turbolinks/turbolinks