5 ms·
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 b
by giaour 7y ago
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.
- pmontra 7y agoI 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 https://github.com/turbolinks/turbolinks/issues/313 and this https://www.mskog.com/posts/instant-page-loads-with-turbolinks-and-prefetch/ 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.
- csande17 7y agoI think you're thinking of https://instant.page/ https://instant.page/ , which is pretty much as simple as "when link is moused over, tell browser to load the page in the background".
- repolfx 7y agoWhat happened to http prefetch or server push? Does anyone use those things?