Earlier today I thought to myself, “if browsers can [prefetch DNS](htt ps://www.google.co.uk/#q=dns+prefetch), surely JavaScript could prefecth web pages?”
I wasn’t wrong.
A quick Google search sent me to http://instantclick.io, which, in the developer’s words, offers:
a JavaScript library that dramatically speeds up your website, making navigation effectively instant in most cases.
It works like this:
- A user hovers over (or touches, on touchscreens) an internal link on your site.
- InstantClick loads the page for the link in the background.
- If the user clicks the link, InstantClick updates your <title> and <body> to display the new content.
That means your page loads as fast as the browser can process the JavaScript, which is damn-near instant in most cases.
Sound good? Download a copy here.
Using WordPress? One-click-install plugin here.
Feeling a bit nerdy? Get the GitHub repository here.
I’ve installed it on our company website and I must say, I am very impressed. Going to try and get a copy running on this blog soon.
Sing your song in the comments, and don’t forget to thank author Alex Dieulot.
Jamie