Boost your Website Speed with 2 Lines of Code
Gijo Varghese
Posted on January 26, 2019
Consider you're reading a blog post. While reaching the bottom you can see related posts. What if your browser will preload those pages even before you click?
Super fast inner pages, right?
Introducing Quicklink
QuickLink is a tiny JavaScript code that will detect links within the viewport and prefetches URLs to the links.
Installation
npm install --save quicklink
import quicklink from "quicklink/dist/quicklink.mjs";
quicklink();
But it will load unnecessary data, will it slow down my user?
Quicklink waits until the browser is idle, checks if the user isn't on a slow connection or has data-saver enabled.
Result? Those URLs will load instantly!
Will it slows down my website?
It's only < 1KB minified/gzipped
Did it help?
Follow me on Twitter, I share a lot of cool stuff there
💖 💪 🙅 🚩
Gijo Varghese
Posted on January 26, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
webdev Best Tools and Resources Best Tools and Resources For Self-Taught Developers
February 27, 2023