instant.page

Intensity

By default, instant.page preloads 65 ms after hovering a link and when a mobile user starts touching their display. There are other options.

Preloading when the mouse is pressed

To preload 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 only preload this way and not preload on mobile, use data-instant-intensity="mousedown-only".

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: data-instant-intensity="150".

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.

Put this HTML snippet just before </body>:
<script src="//instant.page/3.0.0" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>
Copied. Now place it just before </body> on your pages.