Preload Web Pages When Hovering Over Links – Prerender.js

Category: Javascript , Loading , Recommended | April 16, 2020
Views Total:2,227 views
Official Page:Go to website
Last Update:April 16, 2020


Preload Web Pages When Hovering Over Links – Prerender.js


An inspired page preloader to instantly load any webpage your users intend to visit.

prerender.js detects the user interactions and preloads all the assets of a web page in a hidden iframe when the user hovers over the corresponding link or button.

Mobile friendly and cross-browser.

How to use it:

1. Just download & insert the prerender.js JavaScript library into the document and everything is ready.

<script src="prerender.js"></script>

2. The library also works with buttons:

buttonRender = ()=> {
  var x = document.createElement("link");
  x.setAttribute("rel", "prerender");
  x.setAttribute("href", location.href);
document.getElementById("mybutton").onmouseover = ()=> {buttonRender()};
document.getElementById("mybutton").ontouchstart = ()=> {buttonRender()};

You Might Be Interested In:

Leave a Reply