Prefetch
Learn what prefetch is, how it preloads resources for future navigations, and how to use it to create faster browsing experiences that boost SEO.
Prefetch is a browser resource hint that tells the browser to fetch and cache a resource during idle time, anticipating that the user will need it on a subsequent page navigation. Implemented using <link rel="prefetch">, it downloads resources at the lowest priority so it does not compete with critical assets for the current page. Unlike preload, which targets the current page, prefetch prepares resources for the next likely page a user will visit.
Why It Matters for SEO
User engagement signals influence SEO performance. When users navigate quickly between pages on your site, they stay longer, view more pages, and bounce less frequently. Prefetching enables near-instant page transitions by having resources ready before the user clicks, creating an experience that feels as fast as a native application.
For multi-page sites — especially content-heavy sites like blogs, documentation, and e-commerce catalogs — prefetching reduces the perceived latency of clicking through to the next article, product, or category page. This keeps users engaged and sends positive behavioral signals to search engines.
How to Implement
Add prefetch hints for resources likely needed on the next navigation:
<link rel="prefetch" href="/next-page.html" />
<link rel="prefetch" href="/js/product-gallery.js" />
<link rel="prefetch" href="/css/checkout.css" />
You can prefetch entire HTML documents, JavaScript bundles, CSS files, or even images. The browser fetches these during idle periods and caches them for later use.
For more sophisticated implementations, use JavaScript to dynamically add prefetch hints based on user behavior. For example, prefetch a link’s destination when the user hovers over it, or prefetch the most commonly visited next pages based on analytics data.
DNS prefetching is a lighter alternative that resolves only the domain name for external resources: <link rel="dns-prefetch" href="//cdn.example.com">. This saves the DNS lookup time without downloading any content.
Best Practices
- Prefetch high-probability next pages: Use analytics data to identify the most common navigation paths and prefetch those destinations.
- Do not over-prefetch: Prefetching too many resources wastes bandwidth, which is especially problematic for users on metered connections. Limit prefetches to two or three likely next resources.
- Respect data saver preferences: Check the
Save-DataHTTP header and avoid prefetching when users have indicated they want to reduce data usage. - Use DNS prefetch for third-party domains: For external resources like analytics, CDN assets, or font providers, DNS prefetching eliminates lookup latency without downloading unnecessary content.
- Combine with service workers: For progressive web apps, service workers can implement intelligent prefetching strategies that cache entire page shells and API responses.
- Measure the impact: Track how prefetching affects page transition times, pages per session, and bounce rate to validate that your prefetch strategy delivers real user benefits.
Thoughtful prefetching creates smoother browsing experiences that keep users engaged with your content and improve the engagement metrics search engines use to evaluate site quality.