Prefetch

Prefetch is a resource hint implemented via <link rel="prefetch"> that tells the browser to download a resource during idle time and cache it for likely future use, typically a subsequent page navigation. Unlike preload, which targets resources needed for the current page at high priority, prefetch runs at the lowest possible priority and will not compete with critical assets. It is commonly used to pre-cache the HTML, JavaScript bundles, or data for the next page a user is expected to visit — for example, the checkout page after a product page. The fetched response is stored in the HTTP cache and served from there on the subsequent navigation, making that page appear to load nearly instantly. Prefetch is supported in all modern browsers. It differs from the Speculation Rules API, introduced in Chrome 109, which offers a more powerful and configurable way to trigger both prefetch and prerender actions. Developers should be careful not to prefetch large resources unnecessarily, as this consumes user bandwidth without guaranteed benefit.