# instantpage/instant.page

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/instantpage-instant-page).**

6,225 stars · 197 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/instantpage/instant.page
- Homepage: https://instant.page
- awesome-repositories: https://awesome-repositories.com/repository/instantpage-instant-page.md

## Topics

`instant` `performance`

## Description

instant.page is a client-side JavaScript library that preloads linked pages on hover or touch interactions, making navigation feel instantaneous without consuming unnecessary bandwidth. It works by starting to fetch a page the moment a user hovers over a link for 65 milliseconds, leaving over 300 milliseconds for the page to load before the click, and similarly preloads on touch start for mobile visitors.

The script offers multiple preloading strategies to balance responsiveness with resource conservation. It can be configured to preload on mousedown, when links become visible in the viewport, or only for links explicitly marked with a data attribute. The library respects data saver mode, uses passive event listeners and requestIdleCallback to avoid blocking the main thread, and preloads only the HTML of pages where a visit is highly probable.

For deployment, the script can be self-hosted to bypass content blockers that would otherwise disable prefetching from third-party sources. Additional controls include adjustable preload delays, link whitelisting and blacklisting, support for external domain preloading, and handling of query-string URLs and Vary Accept headers for older Chromium browsers.

## Tags

### Web Development

- [Link Prefetchers](https://awesome-repositories.com/f/web-development/resource-preloading/link-prefetchers.md) — Preloads linked pages on hover or touch to make navigation feel instant without consuming unnecessary bandwidth.
- [Hover and Touch Prefetches](https://awesome-repositories.com/f/web-development/cache-restoration-analysis/cache-first-restoration-visits/proactive-cache-preloaders/hover-and-touch-prefetches.md) — Preloads linked pages on hover, touch, or mousedown to make navigation feel instant for website visitors.
- [Mousedown-Triggered Preloaders](https://awesome-repositories.com/f/web-development/cache-restoration-analysis/cache-first-restoration-visits/proactive-cache-preloaders/mousedown-triggered-preloaders.md) — Provides mousedown-triggered preloading that eliminates unused requests while improving load times by 80 ms. ([source](https://instant.page/5.2.0))
- [Probabilistic Preloaders](https://awesome-repositories.com/f/web-development/cache-restoration-analysis/cache-first-restoration-visits/proactive-cache-preloaders/probabilistic-preloaders.md) — Implements probabilistic preloading that conserves bandwidth by preloading only likely-to-be-visited pages. ([source](https://instant.page/))
- [Preloading Whitelists](https://awesome-repositories.com/f/web-development/custom-data-attributes/preloading-whitelists.md) — Restricts preloading to links explicitly marked with a data attribute for fine-grained control.
- [Selective Link Prefetches](https://awesome-repositories.com/f/web-development/resource-preloading/selective-link-prefetches.md) — Uses whitelists or blacklists to control which links are preloaded, preventing unnecessary requests.
- [Touch-Start Preloaders](https://awesome-repositories.com/f/web-development/touch-start-preloaders.md) — Preloads pages on touch start, using the 90 ms before finger lift to fetch the page for instant mobile navigation. ([source](https://instant.page/5.2.0))
- [Viewport-Based Preloading](https://awesome-repositories.com/f/web-development/viewport-based-preloading.md) — Preloads all links as soon as they become visible in the viewport, triggering navigation on click or tap. ([source](https://instant.page/5.2.0))
- [Mousedown-Initiated Fetches](https://awesome-repositories.com/f/web-development/in-page-full-page-translators/background-page-fetches/mousedown-initiated-fetches.md) — Starts loading a page on mouse button press to gain milliseconds before the click is released.

### Mobile Development

- [Touch-Start Navigation Speedups](https://awesome-repositories.com/f/mobile-development/mobile-navigation-ux-enhancements/touch-start-navigation-speedups.md) — Preloads pages on touch start to reduce perceived load time for mobile visitors on slow connections.

### Networking & Communication

- [Prefetch Bandwidth Conservation](https://awesome-repositories.com/f/networking-communication/bandwidth-management/prefetch-bandwidth-conservation.md) — Preloads only the HTML of likely-to-be-clicked pages to conserve bandwidth and server resources.
- [Data-Saver Respectful Prefetches](https://awesome-repositories.com/f/networking-communication/bandwidth-management/video-bandwidth-savers/data-saver-respectful-prefetches.md) — Preloads only the HTML of likely-to-be-visited pages and respects data saver mode to conserve bandwidth. ([source](https://instant.page))
- [Preload Delays](https://awesome-repositories.com/f/networking-communication/http-request-configurations/request-delay-configurations/preload-delays.md) — Provides a configurable delay before preloading begins on hover to balance responsiveness and bandwidth.
- [Preload Initiation Delays](https://awesome-repositories.com/f/networking-communication/network-request-interceptors/request-delays/preload-initiation-delays.md) — Sets a custom delay before preloading begins on hover to balance responsiveness against unnecessary network requests. ([source](https://instant.page/intensity))

### Software Engineering & Architecture

- [Just-in-Time Page Prefetches](https://awesome-repositories.com/f/software-engineering-architecture/performance-reliability/performance-optimization/frontend-rendering-loading/page-navigation-prefetching/navigation-acceleration/navigation-accelerators/just-in-time-page-prefetches.md) — Preloads pages just-in-time so navigation feels instantaneous even on slow connections like 3G. ([source](https://instant.page))

### User Interface & Experience

- [Hover-Triggered Page Prefetches](https://awesome-repositories.com/f/user-interface-experience/hover-previews/hover-triggered-page-prefetches.md) — Starts loading a linked page when the user hovers over it for 65 milliseconds, leaving over 300 ms for the page to load before the click. ([source](https://instant.page/5.2.0))
- [Touch-Start Prefetches](https://awesome-repositories.com/f/user-interface-experience/touch-layout-interactions/touch-and-hold-delays/touch-start-prefetches.md) — Begins fetching a linked page on touch start to reduce perceived load time for mobile visitors.
- [Mousedown-Triggered Click Simulators](https://awesome-repositories.com/f/user-interface-experience/links/click-trackers/mousedown-triggered-click-simulators.md) — Ships a mousedown-triggered click simulation that speeds up navigation by initiating the click on press. ([source](https://instant.page/intensity))
- [Preload Whitelists](https://awesome-repositories.com/f/user-interface-experience/links/link-relationship-attributes/preload-whitelists.md) — Restricts preloading to only links explicitly marked with a data attribute, ignoring all others. ([source](https://instant.page/blacklist))
- [Preload Blacklists](https://awesome-repositories.com/f/user-interface-experience/links/link-security-and-performance/preload-blacklists.md) — Prevents specific links from being preloaded by adding a data attribute to them. ([source](https://instant.page/blacklist))
- [Passive Event Listener Integrations](https://awesome-repositories.com/f/user-interface-experience/native-event-listeners/event-listener-overrides/passive-event-listener-integrations.md) — Uses passive event listeners and respects data saver mode to minimize impact on server resources and user data plans.

### Development Tools & Productivity

- [External Domain Prefetches](https://awesome-repositories.com/f/development-tools-productivity/external-link-openers/external-domain-prefetches.md) — Extends preloading to links pointing to external domains when explicitly allowed. ([source](https://instant.page/blacklist))

### DevOps & Infrastructure

- [Preloading Script Hosting](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-deployments/preloading-script-hosting.md) — Hosts the preloading script on your own server to bypass content blockers that disable prefetching. ([source](https://instant.page/blacklist))

### Security & Cryptography

- [Prefetch Blocker Bypasses](https://awesome-repositories.com/f/security-cryptography/content-blockers/prefetch-blocker-bypasses.md) — Hosts the preloading script on your own server to bypass content blockers that disable prefetching.
