Prerender
Two features do this, by different mechanisms. You can run both.toggle
default:"on"
Prefetches links as the cursor approaches them on desktop, or as they enter the viewport on mobile. By the time the click lands, the page is often already downloaded.On by default, and conservative: same-origin links only, no URLs with query strings, and a cap of 12 prefetches per page. The delay before prefetching, the cap, and the exclusion list are all filterable.
toggle
default:"on"
Pro. Uses the browser’s Speculation Rules API to predict where the visitor is going and load it in advance. On by default with Pro.This goes further than prefetching, because the browser can prerender the page rather than only downloading it, making navigation close to instant.
Prefetch requests carry a
Sec-Purpose: prefetch header. Some CDNs decline to serve them, and pages sent with no-store will not be prefetched at all. If prefetches are being refused, the fix is your caching headers rather than this setting.Resource hints
Resource hints tell the browser about things it will need before it discovers them. Three types, and using the wrong one is worse than using none.repeater
Opens a connection to an origin early: DNS lookup, TCP handshake, and TLS negotiation, all before the first request.For critical third-party origins you know you will need: a CDN, a font host, an API you call on load. Each entry takes an origin and a crossorigin mode of
none, anonymous, or use-credentials.repeater
Downloads a resource immediately at high priority. For things the current page needs to render correctly: a hero image, a critical font, essential CSS or JavaScript.Each entry takes a URL, an
as type of script, style, font, image, or fetch, and a crossorigin mode.repeater
Downloads at low priority for something you might need later, on the next page or after an interaction.Each entry takes a URL, an
as type of script, style, font, image, or document, and a crossorigin mode.Choosing between them
Fonts always need a crossorigin value, even when self-hosted. Set
anonymous for a preloaded font, or the browser fetches it twice.
Progressify
Generatify
Lightify
Rankify
Snapshotify