quicklink
⚡️Faster subsequent page-loads by prefetching in-viewport links during idle time
A tiny JavaScript library from Google Chrome Labs that speeds up websites by silently loading pages in the background while the user reads, so clicks feel instant.
quicklink is a small JavaScript library (under 2KB when compressed) from Google Chrome Labs that speeds up website navigation by loading pages before the user clicks on them. It works by watching which links are currently visible on screen and quietly fetching those destination pages in the background while the browser has nothing else to do.
The library uses three browser features to keep this process safe and unobtrusive. First, it uses the Intersection Observer API to detect which links are within the visible area of the page. Second, it uses the browser's idle callback mechanism to delay any fetching until the browser is not busy with other work. Third, it checks the user's connection speed and respects the data-saver setting, so it does not prefetch on slow connections or when the user has indicated they want to minimize data use.
By default, quicklink prefetches pages using a standard HTML prefetch hint, which the browser processes at low priority. It can also be configured to use prerendering, where the browser fully loads and renders the destination page in the background before the user navigates to it. Prerendering is faster for the user but uses more resources, so it is off by default.
Integration is straightforward. For traditional multi-page websites, you include the script and call quicklink.listen() on the page. For React single-page applications, a higher-order component wrapper is available. The library exposes configuration options for limiting how many requests run simultaneously, how long a link must stay visible before prefetching starts, which external domains are allowed, and which URLs to skip entirely.
The project is maintained by the Google Chrome Labs team and targets general web performance improvement without requiring changes to server infrastructure.
Where it fits
- Speed up navigation on a multi-page website by prefetching links that are currently visible on screen.
- Add instant-feeling page transitions to a React single-page application using the provided HOC wrapper.
- Improve perceived performance on a content site without changing server infrastructure or rewriting HTML.