Preload Pages Based On User’s Intention –

Category: Javascript , Loading , Recommended | February 19, 2023
Views Total:120 views
Official Page:Go to website
Last Update:February 19, 2023


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



  • Refactor: Group top-level variable declarations

You Might Be Interested In:

Leave a Reply