Speculation Rules API: faster navigations and your SEO
Speculation Rules let Chrome prefetch or prerender the next page. Here is how it affects Core Web Vitals, analytics, and crawlers, and where it can backfire.
Some pages feel instant because the browser started loading them before the visitor clicked. The Speculation Rules API is how a site asks for that. It is a small block of JSON in your HTML, and in Chromium browsers it can make the next navigation load almost immediately. It also has side effects that matter for SEO, analytics, and your server. This guide covers what it does, what it does not do, and how to set it up without breaking things.
What Speculation Rules do
You add a script tag with the type speculationrules. Inside it, a JSON object lists URLs, or patterns of URLs, that the browser may load ahead of time. There are two actions.
- Prefetch: the browser downloads the HTML of the next page and holds it. Rendering still happens after the click, so the gain is mostly skipped network wait.
- Prerender: the browser loads the page in a hidden tab, runs its scripts, and builds it fully. On click, it swaps the hidden page in. This is the one that feels instant.
Rules can name exact URLs, or use a where condition that matches link patterns, such as every same-site link except a few paths. An eagerness setting controls how soon the browser acts. Immediate and eager act early. Moderate waits for a hover. Conservative waits for the pointer or touch to go down. Moderate or conservative is a safer start than loading everything on page load.
Support is not universal. As of this writing the API works in Chromium browsers such as Chrome and Edge. Other browsers ignore the script, so nothing breaks, but those visitors get no speedup. Check current browser support before you plan around it.
What it does to Core Web Vitals
Prerendering can make LCP very small for the visitors it reaches, because most of the work happened before the click. Chrome measures the metric from the moment the page is activated, not from when it started loading in the background. That is a real improvement in field data, but only for navigations that were actually prerendered.
It does not fix a slow page. If your page is slow when a visitor lands on it cold, that cold load is still what search crawlers and first-time visitors get. Treat Speculation Rules as a layer on top of a fast page, not a replacement for fixing LCP and INP at the source.
Google has not said that using speculation rules is a ranking factor. Any benefit shows up indirectly, through better field data and happier visitors. Do not expect a ranking jump from adding it.
Crawlers and indexing
Speculation rules are a browser feature. Googlebot and the AI crawlers fetch your HTML and do not click links, so they do not trigger prefetch or prerender. The rules are not a way to help them discover pages, and they do not replace internal links or a sitemap.
The reverse risk is on your server. Every speculative load is a real request. If you prerender dozens of links per page, you can multiply traffic to your origin and fill your logs with requests no human ever saw. Filter these in log analysis. Prefetch requests carry a Sec-Purpose header, so you can tell them apart from normal visits.
What can go wrong
Prerendering runs your page code before anyone looks at it. That causes a few classic problems.
- Inflated analytics: a pageview tag can fire for a page the visitor never opened. Delay tags until the page is activated, using the document prerendering flag and the prerenderingchange event.
- Side effects on GET: never prerender URLs that log out, add to cart, or change state when loaded. Exclude them in your rules.
- Stale content: a prerendered page can be minutes old when the visitor arrives. Be careful on pages with live prices or stock.
- Wasted data: Chrome skips speculation in some modes, such as data saver or low memory. Your rules are a hint, not a promise.
How to roll it out
- Pick one high-traffic path, such as listing page to detail page, and prerender only that.
- Start with moderate eagerness so loads follow clear intent like a hover.
- Exclude cart, account, search results, and any URL with side effects.
- Make your analytics and consent scripts wait for page activation.
- Compare field LCP and server request counts before and after. Chrome DevTools shows which speculations were used or failed.
- Widen the rules only if the data shows a gain and your server copes.
The takeaway: add Speculation Rules as a small, careful test on your most common navigation path. Fix your analytics first, exclude anything with side effects, and judge it by field data, not by how fast it feels on your own laptop.