InstantClick — JS library to make your website instant

submited by
Style Pass
2024-03-28 11:00:03

InstantClick is a JavaScript library that dramatically speeds up your website, making navigation effectively instant in most cases.

Despite huge bandwidth increases, websites don’t get much faster. This is because the biggest bottleneck in loading web pages is latency.1 How does it work

Latency is inevitable with today’s internet architecture so InstantClick cheats by preloading links you are likely to click on.

Before visitors click on a link, they hover over that link. Between these two events, 200 ms to 300 ms usually pass by (test yourself here). InstantClick makes use of that time to preload the page, so that the page is already there when you click.

On mobile devices, preloading starts on “touchstart”, letting 300 ms (Android) to 450 ms (iOS) for preloading the page.2

If you want your website to not be flooded by requests, you can set a delay before preloading starts when users hover a link. It will still feel instant.

Leave a Comment