Before visitors click on a link, they hover over that link. Between these two events, 200 ms to 300 ms usually pass by (test yourself here). InstantClick makes use of that time to preload the page, so that the page is already there when you click.
You hover a link, it Ajaxs for that page and prerenders it. On click, it replaces the
<title> and changes the URL.
I just heard about it. Seems pretty smart. Progressive enhancement. Increased perceived performance. I can imagine one objection being bandwidth concerns. Downloading every page I hover over seems a bit bandwidth greedy.
It got me thinking though… isn’t there a newfangled prerendering thing? There is:
<link rel="prerender" href="(url)">
It’s not that newfangled, actually. Steve Souders wrote about it in 2013:
Can I Use shows decent support:
This browser support data is from Caniuse, which also reports this feature is in W3C Working Draft status.
|Google Chrome||Mozilla Firefox||Internet Explorer||Opera||Apple Safari|
Mobile / Tablet
|iOS Safari||Android||Opera Mobile||Android Chrome||Android Firefox|
Doesn’t that mean we could do something like this?
var links = document.querySelectorAll('a');