By default, instant.page preloads 65 ms after hovering a link and when a mobile user starts touching their display. It also triggers a click when the mouse is pressed. There are other options.
Preloading when the mouse is pressed
To load the page when the user starts pressing their mouse button, right before releasing it, add
data-instant-intensity="mousedown" as an attribute to the <body>.
This leaves on average 80 ms for the page to preload.
To have it this way just on desktop and not preload on mobile, use
Adjusting the delay on hover
For some sites with a lot of huge click targets, such as some e-commerce sites, the 65 ms rule doesn’t apply: it will preload more than two times for each page visited.
To increase the delay on hover, pass the number of milliseconds in the attribute, like so for 150 ms:
Alternatively, if you don’t care about making a lot of requests, you can decrease it.
Preloading links as soon as they’re visible
On small mobile devices (such as smartphones) if you want your pages to be instant in more situations you can preload links as soon as they’re visible.
To do so, add
data-instant-intensity="viewport" as an attribute to the <body>.
You can also do so on other form factors by using
"viewport-all", if you’re not worried about making a lot of requests.
Note that if the user is on 2G or has data saver enabled it will fall back to using the default options.
Disabling triggering a click when the mouse is pressed
If you’d rather not trigger a click faster, add
data-instant-no-mousedown-shortcut as an attribute to the <body>.
<script src="//instant.page/5.0.1" type="module" integrity="sha384-0DvoZ9kNcB36fWcQApIMIGQoTzoBDYTQ85e8nmsfFOGz4RHAdUhADqJt4k3K2uLS"></script>