With just one line of javascript, you can boost your website speed like localhost cached pages

@huoadig May 01, 2019 6678 views preload

Amazon and others found that removing 100 milliseconds of latency improves sales by 1%. But latency on the web is hard to overcome.

All websites are thinking about increasing the speed of the network at all costs and providing users with a more friendly browsing experience.

Instant.page has taken into account the need to decrease the load time of the web pages. It provides a solution with almost zero cost, which can effectively improve the speed of the browser. When users browse the next page, it is instantly ready on hand. Users feel that the next page has been cached. The most important thing is that this solution is very simple to implement, you only need to add a line of js code to all pages, and the rest of the work will be done by itself.

How does it work like magic?!

1. Predict which url is going to be clicked. Works for PC & Mobile.

Before a user clicks on a link, they hover their mouse over that link. When a user has hovered for 65 ms there is one chance out of two that they will click on that link, so instant.page starts preloading at this moment, leaving on average over 300 ms for the page to preload.

Another option is to preload when the user starts pressing their mouse, right before releasing it. This makes for virtually zero unused requests while still improving page loads by 80 ms on average.

On mobile, a user starts touching their display before releasing it, leaving on average 90 ms for the page to preload.

2. Just-in-time preloading

It preloads a page right before a user clicks on it. Pages are preloaded only when there's a good chance that a user will visit them, and only the HTML is preloaded, being respectful of your users' and servers' bandwidth and CPU.

You don't need to worry about your server. Easy on your server and your user's data plan.

3. Free for personal & business use

And it's free and open source (MIT license).

4. Extremely easy to implement

Put this HTML snippet just before :

<script src="//instant.page/2.0.0" type="module" defer integrity="sha384-D7B5eODAUd397+f4zNFAVlnDNDtO1ppV8rPnfygILQXhqu3cUndgHvlcJR2Bhig8"></script>


Voted up by 445 users:
When you and other people like the post, the author will get paid. If you like to read the content here, please create your account now and start earning for free!
People also read:
What's Hot
Active Members