Preload Pages Based On User’s Intention –

Category: Javascript , Loading , Recommended | April 10, 2019
Author: instantpage
Views Total: 228 views
Official Page: Go to website
Last Update: April 10, 2019
License: MIT


Preload Pages Based On User’s Intention –

Description: is a small JavaScript library used to boost the page loading speed by preloading target pages when a user intends to click on the link (mouse hover).

It also supports mobile devices that automatically preloads pages when a user starts touching the screen.

Based on the browser link prefetching mechanism.

How to use it:

Just import the as a module into the document and done.

<script src="//" type="module" integrity="sha384-EwBObn5QAxP8f09iemwAJljc+sU+eUXeL9vSBw1eNmVarwhKk2F9vBEpaN9rsrtp"></script>

Preload all the links within the document.

<body data-instant-allow-query-string>

Preload specific pages within the document.

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

Prevent specific pages from preloading.

<a href="articles?page=4" data-no-instant>
  Page 4



  • v1.2.2

You Might Be Interested In:

Leave a Reply