Speculation Rules API

What the Speculation Rules API (prefetch and prerender) actually is, whether it affects SEO, crawling, or rankings, and how to implement it without inflating your analytics.

First published: Jul 3, 2026 · Last updated: Jul 18, 2026 · Advanced
demand #26 in Web Performance#249 in Technical SEO#338 on the site

The Speculation Rules API is a Chromium browser feature (Chrome/Edge 109+) that lets a site tell the browser to prefetch (download the HTML document) or prerender (fully load and render in an invisible tab) same-site pages before a visitor clicks — so the next navigation feels near-instant. Prefetch pays down TTFB; prerender additionally pays down FCP and LCP. It is not a crawling, indexing, or ranking mechanism — Googlebot doesn't need resource hints like this and Google publishes no Search documentation on it. Google Search itself uses the API to prefetch its top results, and Ray-Ban reported large conversion and LCP gains from prerendering, so the real value is Core Web Vitals and UX for actual visitors. The big risk to manage is analytics: a speculated page that fires a pageview before the user sees it will inflate GA4 unless the tracking checks document.prerendering. WordPress 6.8 ships a conservative, prefetch-only version on by default for logged-out users.

Evidence for this claim The Speculation Rules API lets supporting browsers prefetch or prerender likely future navigations. Scope: Browser navigation optimization; support and restrictions vary by browser version. Confidence: high · Verified: Chrome Developers: Speculation Rules API Evidence for this claim Prerendering executes a page before activation, so analytics and side effects must account for the prerendering lifecycle. Scope: Supporting browsers and prerendered documents. Confidence: high · Verified: web.dev: Speculation rules

TL;DR — The Speculation Rules APIThe Speculation Rules API is a Chromium browser API (Chrome/Edge 109+) that lets a site tell the browser which same-site pages to prefetch (download the HTML document) or prerender (fully load and render in an invisible tab) before a visitor clicks — so the next navigation can be near-instant. It's a browser-side performance feature for real users, not a crawling, indexing, or ranking signal. (Chromium, Chrome/Edge 109+) lets a site declare — in JSON, inline or via a Speculation-Rules header — which same-site URLs the browser should prefetch (download the document; pays down TTFBTime to First Byte — the time from the start of a request to when the first byte of the response arrives. It's a diagnostic metric (not a Core Web Vital) and a major input to FCP and LCP; ≤0.8 s is good.) or prerender (fully fetch, render, and run JS in an invisible tab; pays down TTFBTime to First Byte — the time from the start of a request to when the first byte of the response arrives. It's a diagnostic metric (not a Core Web Vital) and a major input to FCP and LCP; ≤0.8 s is good. + FCPFirst Contentful Paint — the time from when a page starts loading to when any part of its content (text, image, SVG, or non-white canvas) first renders. Good is ≤1.8 s at the 75th percentile. It's a diagnostic metric, not a Core Web Vital. + LCPLargest Contentful Paint — render time of the largest visible image or text block, relative to when the page started loading. ≤2.5 s (at the 75th percentile) is good.). Eagerness (immediate/eager/moderate/conservative) controls when a rule fires, separate from which URLs it targets. It is not a crawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor./indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed./ranking mechanism — GooglebotGooglebot is Google's web crawler — the software that fetches pages so Google can index and rank them. It comes in two variants, Googlebot Smartphone (primary, under mobile-first indexing) and Googlebot Desktop, and runs an evergreen Chromium renderer. doesn’t rely on resource hintsResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. like this (per Illyes’ Feb 2026 comments on hints generally) and Google publishes no Search docs on it. But Google Search itself uses it to prefetch its top results, and Ray-Ban reported large conversion + LCPLargest Contentful Paint — render time of the largest visible image or text block, relative to when the page started loading. ≤2.5 s (at the 75th percentile) is good. wins, so the payoff is real for actual visitors via Core Web VitalsGoogle's three real-user UX metrics — LCP (loading), INP (responsiveness), and CLS (visual stability) — used by Google's ranking systems, with no official weight attached, measured on field data. and UX. Biggest gotchas: analytics double-counting (fix with document.prerendering/prerenderingchange), state-changing GET URLs (logout, add-to-cart) you must never speculate, and Chromium-only support. Start with prefetch broadly; add prerender to one or two high-confidence pages at most.

What the Speculation Rules API actually is

The Speculation Rules API is a browser API — Chromium only — that lets a site tell the browser which same-site pages to prepare before a visitor clicks. Per MDN, the API is designed to improve performance for future navigations, and because it targets document URLs rather than individual resource files, it makes sense for multi-page sites rather than single-page apps. It supersedes the old, deprecated, Chrome-only <link rel="prerender"> and goes beyond the widely-available <link rel="prefetch"> with a more expressive JSON syntax.

Rules are declared as JSON, either inline in a <script type="speculationrules"> block or via a Speculation-Rules HTTP response header. They can list explicit URLs or auto-match links on the page via where/href_matches conditions (called document rules).

There are two speculative actions, and getting the distinction right is the whole game:

  • Prefetch downloads the response body of the referenced page — but not its subresources. It pays down the next page’s TTFB.
  • Prerender fetches, renders, and loads the page into an invisible in-memory tab: all subresources, all JavaScript, even data fetches kicked off by JS. Per MDN, future navigations to a prerendered page are near-instant. It pays down TTFB and FCPFirst Contentful Paint — the time from when a page starts loading to when any part of its content (text, image, SVG, or non-white canvas) first renders. Good is ≤1.8 s at the 75th percentile. It's a diagnostic metric, not a Core Web Vital. and LCP — but it’s far more expensive and riskier.

Harry Roberts’ shorthand in his layered-approach write-up captures it well: prefetch is for paying down TTFB, prerender is for LCP.

One under-covered technical nuance: speculated resources land in the browser’s memory cache, which is quicker to retrieve than the HTTP cache the older <link rel="prefetch"> hint uses. And a prefetched or prerendered document also populates the HTTP cache, so even a speculation the visitor never uses isn’t pure waste — a later navigation can still benefit.

Eagerness: when to speculate, separate from which URLs

A genuinely clever design choice here is that eagerness is a separate lever from targeting. Barry Pollard’s Chrome blog post on the API’s improvements frames it as separating when to speculate from which URLs to speculate on. There are four levels:

  • immediate — speculate as soon as the rules are seen (on page load).
  • eager — start on the slightest signal.
  • moderate — roughly a 200ms hover (or pointerdown on touch).
  • conservative — pointer- or touch-down, i.e. the visitor has all but clicked.

Treat these four trigger definitions as Chrome’s current heuristics, not a fixed spec — Chrome has changed the exact mobile triggers more than once (it moved moderate to viewport-based heuristics and adjusted eager’s timing as recently as January 2026), so re-check the live docs before quoting an exact millisecond or percentage threshold in your own implementation notes.

Two related refinements worth knowing: No-Vary-Search lets the browser reuse a cached document that differs only by ignorable parameters (e.g. UTM-tagged variants of the same page), and the newer prerender-until-script pattern (covered by CoreWebVitals.io) offers a middle ground between plain prefetch and a full prerender — as of this writing it’s still an experimental, not-generally-available action running in a Chrome origin trial, not a shipped default.

Chrome’s own guardrails

You can’t accidentally nuke a visitor’s device with an over-broad rule. Chrome’s prerender documentation sets hard, FIFO caps regardless of your configuration: for immediate-eagerness rules, 50 prefetches and 10 prerenders; for interaction-based (moderate/ conservative) rules, 2 slots. Chrome also treats a prerender as a hint and a progressive enhancement, not a guarantee — it can decline based on the user’s settings or resource constraints — and it won’t render cross-origin iframesHTML element that displays one webpage inside another — how embeds work. on a prerendered page until activation. A built-in privacy guard also blocks cross-site prefetches when the user already has cookies set for the destination site.

Cross-origin rules, and what actually happens inside a prerendered page

Per MDN, prerendering is restricted to same-origin documents by default. Cross-origin, same-site prerendering is possible, but only if the target page opts in with a Supports-Loading-Mode: credentialed-prerender response header — cross-site prerendering isn’t possible at all as of this writing. Cross-site prefetch is more permissive (same-site and cross-site prefetches both work), but still gated by the no-cookies-set privacy rule above; a broader cross-site prefetch opt-in via Supports-Loading-Mode is documented as planned but not yet shipped.

Inside the hidden tab, a prerendering page isn’t a normal page load: intrusive APIs (alert()/confirm()/prompt(), requestFullscreen(), Navigator.share()) are blocked or ignored, async APIs like geolocation and getUserMedia() are deferred until activation, and cross-origin iframes and worker scripts don’t run until then either. Session storage gets special handling worth knowing if your page reads it on load: a prerendering page starts with a clone of the tab’s session storage, and that clone is discarded in favor of the real tab’s storage at activation — so test any session-storage-dependent logic both before and after the prerenderingchange event, not just on a normal load. For timing, document.prerendering and prerenderingchange tell you the state and the activation moment; PerformanceNavigationTiming.activationStart gives you the actual elapsed time between prerender start and activation if you want to measure it.

Does the Speculation Rules API affect SEO, crawling, or rankings?

This is the question every SEO wants answered, and most competing articles wave it away. The precise answer has two halves.

What it does NOT do

It is not a crawlingCrawling is how search engines use automated bots (like Googlebot and Bingbot) to discover URLs and download pages. A page has to be crawlable to be indexed, but crawling on its own isn't a ranking factor., indexingStoring a crawled page in the search index so it can appear in results. Crawled is not the same as indexed — Google selects what to keep, and indexing isn't guaranteed., or ranking mechanism. There is no Google Search Central documentation tying the Speculation Rules API to how GooglebotGooglebot is Google's web crawler — the software that fetches pages so Google can index and rank them. It comes in two variants, Googlebot Smartphone (primary, under mobile-first indexing) and Googlebot Desktop, and runs an evergreen Chromium renderer. crawls or indexes — because it doesn’t touch that layer at all. It’s a browser feature for human visitors in Chromium.

The closest thing to an on-the-record Google statement is Gary Illyes on Search Off the Record (early 2026), talking about resource hintsResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. in general — not the Speculation Rules API by name. As Search Engine Journal reported, Illyes’ point was that Googlebot’s own infrastructure has near-infinite bandwidth and very fast DNS resolution, so hints like DNS-prefetch and preload hold essentially no value for its crawling process — it can already talk to servers fast and doesn’t need to be told to fetch things earlier. Treat that as support for “this is a browser/visitor feature, not a crawlerA crawler — also called a spider or bot — is an automated program that fetches web pages, extracts their links, and queues new URLs to visit. Search engines use crawlers to discover and download content for their index. one,” but note the scope: Illyes was addressing the broader resource-hints family, not Speculation Rules specifically. This is the same discipline the sibling resource hintsResource hints are <link> elements (or equivalent HTTP Link headers) that tell the browser to do network work — DNS lookups, connection setup, or fetching a resource — earlier than it would discover the need on its own. The main ones are dns-prefetch, preconnect, preload, modulepreload, and prefetch. piece applies.

Also worth stating plainly because people ask: Bing has published nothing on the Speculation Rules API for SEO. Edge (Chromium 109+) supports it as a browser feature, but there’s no bingbotBingbot is Microsoft Bing's primary web crawler — the bot that discovers, fetches, and renders pages to build the Bing index. That index also powers Yahoo, DuckDuckGo, Ecosia, and Microsoft Copilot, so Bingbot's reach is far wider than Bing's own search-market share. or indexing angle — which is exactly what you’d expect for a renderingTurning HTML, CSS, and JavaScript into the final visual page and DOM.-browser feature rather than a search-engine-crawler one.

What it CAN do

It can improve Core Web VitalsGoogle's three real-user UX metrics — LCP (loading), INP (responsiveness), and CLS (visual stability) — used by Google's ranking systems, with no official weight attached, measured on field data. — especially LCP, and indirectly INPInteraction to Next Paint — the input-to-paint latency at the 75th percentile of a page's interactions. ≤200 ms is good. by front-loading JavaScript execution before the interaction happens — for real users. Core Web VitalsWeb Vitals is Google's initiative (launched May 2020) for unified page-experience quality signals. Core Web Vitals — LCP, INP, and CLS — are the subset used in ranking; the rest (TTFB, FCP, TBT, Speed Index) are diagnostic, not ranking factors. is a documented (if modest) ranking signal via the page experience system, so there’s an indirect ranking pathway. But the stronger case is plain UX and conversion: making the next page feel instant is a real business lever independent of rankings.

The non-overclaiming way to frame it: Speculation Rules won’t get you crawled or indexed differently — it makes a page feel instant once a real visitor is already navigating your site, which is a UX and Core Web Vitals lever, not a crawler one.

Real-world results

Two proof points do the heavy lifting here, and both come from Google’s own publications.

Google Search uses it on itself. Per the Chrome team’s 2025 announcement, one of the first uses of speculation rules was to prefetch the first two search results. The measured gains: on Android Chrome, LCP for clicks from Google Search was reduced by 67 milliseconds; on desktop, a similar 58.6 millisecond LCP improvement. Hover-based prefetching of the remaining results cut desktop FCP by 7.6 milliseconds and LCP by 9.5 milliseconds. For cross-origin result prefetches, Google Search routes them through Chrome’s private prefetch proxy to anonymize the request. Very few competing articles cite that Google trusts this enough to run it on google.com/search at scale — and published the exact millisecond deltas.

Ray-Ban’s case study is the business-impact proof. Google’s web.dev case study reports that after prerendering product pages, mobile conversion rates on PDPs increased by 101.47% and desktop by 156.16%, with a 43% improvement in LCP on both desktop and mobile. Exit rates dropped roughly 13% on both, and pages viewed per session rose 51.95% on mobile and 65.30% on desktop. The implementation split is instructive: desktop used moderate eagerness triggered by hovering product tiles; mobile (no hover state) used immediate eagerness on just the first four tiles, which were the most-clicked.

And the scale is already large: WordPress 6.8 (March 2025) ships this by default, building on a feature plugin that was on tens of thousands of sites before core adoption — meaning a meaningful share of the web already has speculation rules running without anyone configuring them.

How to implement it safely

The consensus adoption order, from both Google’s docs and independent experts:

  1. Start with prefetch, broadly. Per Chrome’s implementation guide, prefetch is relatively safe for most sites and is the initial approach many take.
  2. Add prerender narrowly, later. Chrome’s docs warn against over-prerendering at a cost of user resources, and recommend keeping prerenders down to one or two pages at most. Harry Roberts reaches the same conclusion independently — a wildcard-like match is too greedy, and prerendering everything is usually too expensive and too risky; an opt-in approach is better.
  3. Use document rules to scale without per-page config. Rather than hand-listing URLs on every page, a where/href_matches condition sources URLs from the document itself so one rule set can apply site-wide.
  4. Mind your CSP. Inline <script type="speculationrules"> blocks need explicit allowance in script-src — via 'inline-speculation-rules', a hash-source, or a nonce-source — or they silently fail when a Content Security Policy is in place.

What NOT to prefetch or prerender

Both MDN and Chrome’s implementation guide are explicit that some URLs must never be speculated, because a speculative fetch is still a real request that can trigger real side effects. The danger list:

  • Sign-out / logout URLs.
  • “Add to cart” URLs.
  • Language- or currency-switcher URLs.
  • Sign-in flows that trigger an SMS/OTP.
  • URLs that increment a usage allowance or fire ad-conversion tracking.

The root fix is a design one: state changes — like a /logout action — shouldn’t be plain GET links that a speculation rule could fetch in the first place.

Prerender is stricter still. Additionally unsafe to prerender: pages that modify client-side storage on load, send analytics or ad-impressions on load, or otherwise cause side effects as if the user had interacted. MDN’s framing is that prerendering is riskier than prefetching and should be done sparingly, only where it’s worth it.

Fixing the analytics problem

This is the trap that catches real sites. A prerendered page fully loads before the user ever sees it. If a page_view (or an ad impression, or a Meta Pixel event) fires on load, you’ve logged a visit that didn’t happen — inflating GA4 sessions and corrupting attribution.

The mechanism to fix it is documented in MDN and Chrome’s guides:

  • document.prerendering is true while a page is being prerendered.
  • The prerenderingchange event fires on activation (when the user actually navigates in).
  • Servers can also detect speculative requests via the Sec-Purpose request header (prefetch, or prefetch;prerender).

The practical reality: per Chrome’s implementation guide, some analytics providers (Google Analytics) and ad providers (Google Publisher Tag) already support speculation rules and won’t log a view until the page is activated. GA4’s own gtag.js handles it for you. What typically doesn’t handle it by default: custom GTM tags, Meta Pixel, and homegrown scripts. For tag-manager setups, one clean approach is to delay the tag manager script itself, or gate specific code until the page is activated or made visible. There’s a documented real-world version of getting this wrong — WordPress 6.8 sites reportedly firing GA4 and Meta Pixel ghost visits after the feature auto-enabled; Erwin Hofman covers the fix in depth.

Browser support reality check

This tempers ROI expectations and most articles bury it: the Speculation Rules API is Chromium-only (Chrome and Edge 109+). It is not Baseline. Firefox has a positive standards position on the prefetch portion only and hasn’t shipped it; Safari has an implementation behind a flag, off by default. A meaningful share of any site’s traffic — everyone on Firefox and Safari — gets zero benefit, so size your expectations accordingly.

Speculation Rules in WordPress 6.8+

Because so much of the search audience is on WordPress and got this by default: WordPress 6.8 (March 2025) ships built-in Speculative Loading, on by default for logged-out visitors, using a conservative, prefetch-only configuration out of the box. Site owners can customize the behavior — including opting into prerender for key URLs — via the wp_speculation_rules_configuration filter (Weston Ruter, a Google engineer and WordPress core contributor, has a walkthrough). The default is deliberately safe, which is why most WordPress sites can leave it on — but it’s also why the analytics gotcha above surprised a lot of site owners who never chose to enable anything.

Myths, debunked

  • “Speculation Rules will help Googlebot crawl my site faster.” No — it’s a browser-rendering feature for human visitors in Chromium; Googlebot’s own infrastructure doesn’t need hints like this, and no Google doc links the API to crawling.
  • “It’s the same as <link rel="prefetch">/<link rel="prerender">.” Not quite — it supersedes the deprecated Chrome-only rel="prerender", adds a richer JSON syntax (document rules, eagerness), and stores speculated resources in the memory cache rather than the HTTP cache.
  • “Prerendering everything makes my whole site instant with no downside.” No — Chrome warns against over-prerendering, enforces hard caps, and both Google and Harry Roberts recommend at most one or two prerendered pages.
  • “If I add speculation rules my analytics just works.” Only if every analytics and ad script defers via document.prerendering/prerenderingchange. GA4 handles it; many GTM tags and third-party pixels don’t.
  • “It’s universally supported, so it’s a safe default for all traffic.” No — Chromium-only, not Baseline; Firefox and Safari don’t ship it by default.
  • “Prefetch is risk-free, so I can wildcard it.” Overstated — a wildcard-like match is too greedy, especially for state-changing GET URLs that should never be fetchable links in the first place.
  • “This will directly move my rankings.” Not established by any official source as a direct ranking factor. The credible chain is Speculation Rules → better real-user Core Web Vitals / conversion → the existing, modest page-experience signal, plus business wins that matter regardless of rankings.

Where this sits

This is a web performance topic, not a crawling one — and keeping that line clean is the point. It’s a close cousin of resource hints (preload/preconnect/dns-prefetch/prefetch), which share the “browser does network work earlier” idea and the same “doesn’t help Googlebot” caveat; it feeds Core Web Vitals (LCP especially); and it interacts with caching and a CDN since speculated documents populate caches. For the crawler-side analogue of “ask before you re-fetch,” the conditional-requests topic covers how Googlebot avoids re-downloading unchanged pages — a different layer (crawler, not browser), same discipline of separating mechanics from ranking impact.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.