Skip to main content

InstantPage

InstantPage is just-in-time preloading — it preloads a page into the browser right before a user clicks on it.

Accelerated Domains automatically injects InstantPage JavaScript on-the-fly, without any need for development on the site. Accelerated Domains has a shared, global CDN for the InstantPage JavaScript which ensures maximum cache hit rate on the script file required, and it does not require connection to a secondary domain as it loads it under the acd-cgi endpoints.

note

This feature can be disabled for any Accelerated Domain on request. Get in touch with Servebolt Support if you want this feature disabled.

warning

This feature can create an increase of Dynamic Requests. For most sites running Accelerated Domains the increase is insignificant.

The experience#

On Desktop#

Before a user clicks on a link, they hover their mouse over that link. When a user has hovered for 65 ms there is one chance out of two that they will click on that link, so InstantPage starts preloading at this moment, leaving on average over 300 ms for the page to preload.

On Mobile#

A user starts touching their display before releasing it, leaving on average 90 ms for the page to preload.

Easy on your site and your user’s data plan#

Pages are preloaded only when there’s a good chance that a user will visit them, and only the HTML is preloaded, being respectful of your users’ and servers’ bandwidth and CPU. It uses passive event listeners and requestIdleCallback so that your pages stay smooth. It respects data saver mode. It’s 1 kB and loads after everything else.

What it doesn't preload#

InstantPage is configured to not preload links it finds that include a query string, and it does not preload external links.

Customize#

Blacklisting pages from preloading#

To manually blacklist a link that triggers an action add a data-no-instant attribute to them:

<a href="/logout" data-no-instant>Log out</a>

This is to be used mainly if you have , otherwise by default links with a query string are already blacklisted.

Whitelisting pages with a query string#

If you want to let all pages with a query string be preloaded, add a data-instant-allow-query-string attribute to the <body>.

If you’d like to allow only select links with a query string to be preloaded, add a data-instant attribute to them:

<a href="articles?page=2" data-instant>Page 2</a>