--- title: "Intent-Driven Prefetching" category: studio-standards status: recommended url: https://webspecification.com/spec/studio-standards/intent-driven-prefetching/ source_repo: undefined licence: CC-BY-4.0 --- # Intent-Driven Prefetching > Using hover-intent or intersection observers to prefetch the HTML payload of links. ## What is it? Intent-driven prefetching anticipates user navigation by downloading the HTML payload of a destination URL the millisecond a user demonstrates intent (e.g., hovering over a link or touching it on mobile), before the actual click occurs. ## Why does it matter? Single Page Applications (SPAs) feel fast because they don't trigger full page reloads. To achieve SPA-like navigation speeds on a traditional Multi-Page Application (MPA), the browser must cheat time. By fetching the HTML ~200ms before the click actually happens, the next page renders instantly. ## How to implement it ### 1. Speculation Rules API The modern, browser-native approach is the Speculation Rules API. This tells the browser to pre-render or pre-fetch links on hover automatically. ```html ``` ### 2. Library Fallback For older browsers, use a lightweight library like `quicklink` or implement a custom `mouseenter` listener that dynamically injects a `` tag into the ``. ## Verification - Open the Network tab in DevTools. Hover over a link on your site. You should see a network request for the HTML of the target page with a `Priority: Lowest` status before you even click.