Mission Growth

Speculation Rules API: What It Saves and When to Use It

The Speculation Rules API prefetches or prerenders the next page before a click. See eagerness settings, measured gains, Google Search's use and what fits.

Published 16 min read
Speculation rules API shown as a browser frame with two link tiles pulling pages out early and a timer with a pinch of green sand
On this page

The Speculation Rules API is a milliseconds feature, and the numbers that deserve trust are the controlled ones. Google Search's own A/B tests put prefetch at 58.6 to 67 ms for the first two results and 9.5 ms beyond them, well below the roughly 220 ms desktop median Shopify documents.

The one published business lift is Ray-Ban's +101.47% mobile conversion, and it compares cohorts on a page that was prerendered for only 29% of mobile visits.

If you've met "speculation rules" in a Lighthouse note, a WordPress release or an AI answer, this guide helps you decide whether to ship them. It covers what the two postures do, which eagerness to pick, what real deployments measured and what Google Search does to your page before the click.

You also get a rule set to copy. The full property reference stays with MDN, and nothing here promises a ranking gain.

What the Speculation Rules API does

The Speculation Rules API lets a page tell Chrome which same-site links to prefetch or prerender before the visitor clicks.

The rules are JSON, and the browser decides when to act on them. A prefetch fetches the HTML document only, which gets that critical first resource ahead of time. A prerender does much more: it fetches the subresources, starts to render the page and executes JavaScript almost as if the page were open in a hidden background tab.

Picking between speculation rules prefetch vs prerender comes down to cost. Prefetch is cheap on bandwidth and CPU and still shortens the wait for the first response. Prerender gives the closest thing to an instant page, but it runs your scripts early, so analytics and cart state can fire before the visitor arrives. Chrome also caps prerenders at two or ten at a time depending on eagerness.

Rules can live in three places: an inline <script type="speculationrules"> tag, an external JSON file referenced by the Speculation-Rules header on the HTTP response, or a script element your own JavaScript injects. The header form lets a platform ship rules without touching templates, which is how Shopify delivers its default.

Whichever form you choose, the rule is a hint. The WHATWG specification lets a browser ignore any rule, and Chrome does so under Save-Data and, on low battery, Energy Saver. A rule is a request and never a command.

Three more limits shape expectations:

  • Same-site scope. Rules help follow-up navigations on your own site. A first visit from search lands on a cold page, and a different fix applies there; the Google Search section below covers the one mechanism that does help.
  • A third posture exists. Many pages, including the AI Overview for this query, describe two actions. Chrome has since added prerender until script, which is in an origin trial from Chrome 144 and is not a shipped feature. CoreDash's November 2026 crawl found 0.2% of sites already using it.
  • Preload answers a different question. <link rel="preload"> prioritises resources for the page the visitor is already on. Speculation rules load a future page.

Eagerness: when the browser starts loading

Eagerness sets the moment the browser starts a speculation, and on mobile Chrome moderate no longer waits for a tap. Four speculation rules eagerness values exist, and the default depends on the rule type: list rules (explicit URLs) default to immediate, and document rules (matching links on the page) default to conservative.

Speculation Rules API eagerness table listing the four values with their triggers, mobile behaviour and default rule type.
Eagerness values with trigger on desktop and mobile and the Chrome cap per value.
ValueTrigger (specification wording)Mobile ChromeDefault for
immediateAs soon as possible, subject to user preferences and resource limitsSpec wordingList rules
eagerOn any slight suggestion that a link may be followedSpec wordingNone
moderateA reasonable suggestion the user will follow the link in the near future, for example hover or focusLink enters the viewport and passes other likelihood conditionsNone
conservativeOnly when the user starts to click, on mousedown or pointerdownSpec wordingDocument rules

Chrome limits prerenders to two or ten at a time depending on eagerness, so a generous value on a prerender rule fills the budget quickly.

The correction matters because most write-ups predate it. DebugBear's list and dev.to describe moderate as hover. Chrome's public service announcement of 23 June 2025 moved moderate on mobile: prefetches and prerenders now trigger when a link enters the viewport and passes other conditions that indicate it is more likely to be clicked.

A phone has no hover, so moderate on mobile used to wait for pointerdown, the trigger conservative uses.

The consequence is cost. On phones moderate now speculates more links than it did before the change, which raises the load on your servers and the data the visitor spends. Shopify's reading of its August 2025 mobile average (180 ms against 130 ms on desktop), that a tap takes about 50 ms longer than a click under conservative eagerness, applies to conservative alone.

If you copy a "moderate" rule from an older tutorial, you are running a different rule on mobile today than the tutorial describes.

What it saves: measured gains from Google Search, Shopify, WordPress and Ray-Ban

Published deployments show prefetch saving tens to a couple of hundred milliseconds per navigation, and only a prerender on one high-intent page has shown a double-digit LCP change. The table lists every deployment with a measured size, with the posture and trigger beside it.

DeploymentPosture and triggerSizeMeasure
Google Search, first two results (Chrome for Android)Prefetch, list rule67 msLCP reduction, A/B tested
Google Search, first two results (desktop Chrome)Prefetch, list rule58.6 msLCP reduction
Google Search, results beyond the first two (desktop)Prefetch on hover9.5 msLCP reduction, A/B tested (FCP 7.6 ms)
Shopify default (August 2025 post)Prefetch, conservative130 ms desktop, 180 ms mobileAverage across all percentiles and loading metrics
Shopify default (current docs)Prefetch, conservativeAbout 220 ms desktop, about 20 ms mobileMedian
WordPress core defaultPrefetch, conservativeAbout 1.9% at the medianImprovement in LCP passing rate
Ray-Ban product pagesPrerender, device-specificLCP 4.69 s to 2.66 s on mobile, 3.03 s to 1.74 s on desktopCrUX URL-level data

Download CSV (CC BY 4.0)

Bar chart of four measured gains in milliseconds, from 9.5 for later Google results to 220 for Shopify desktop median.
Measured LCP or navigation gain in milliseconds, Google Search first two results (Android, desktop), results three and later (desktop) and the Shopify docs median (desktop).

The Google Search rows are cross-site prefetches of search results over an anonymous proxy, so they describe what Google Search does for a visitor arriving at your site. The Shopify, WordPress and Ray-Ban rows are same-site navigations inside one store or site.

Which Shopify number to plan with. Shopify's own pages give two figures that look like one. Its August 2025 post reports an average 130 ms improvement on desktop and 180 ms on mobile across all percentiles. Its current docs report roughly 220 ms faster at the median on desktop and roughly 20 ms on mobile.

Those are different statistics, an average across percentiles and a median, so don't merge them. Plan with the median, because the typical visitor sits there. The mobile median of about 20 ms is the figure to remember before you promise a phone-speed win.

The head start decays. Google Search's desktop numbers show how much timing matters. Prefetch started at page load, for the first two results, saved 58.6 ms. Prefetch started on hover, for later results, saved 9.5 ms.

Our derived ratio is 6.2 (58.6 divided by 9.5, rounded to one decimal), so the head start is about 6.2 times smaller when speculation waits for hover. Eagerness is the main lever you control, and a conservative setting buys a smaller head start in exchange for fewer wasted requests.

The cost side. Shopify's default adds only about 0.7% extra Storefront Renderer traffic, and about 10% of all users get the HTML before navigation starts. That's the trade: a small traffic increase for a head start that reaches about a tenth of users.

Ray-Ban is one case, not a rate. Ray-Ban reported a 43% LCP improvement on both desktop and mobile after prerendering product detail pages, and conversion rates up 101.47% on mobile and 156.16% on desktop.

Read the conversion figures with the method in view. The business metrics of users browsing the page served from the server were compared with those browsing the prerendered page, and the prerender rate was 29% on mobile and 50% on desktop. The case study calls the result A/B-tested but does not say how visitors were assigned, so the lift may not isolate the rule.

Shopify's own A/B setup, by contrast, did not allow conclusive business impact numbers. So treat Ray-Ban as one measured case and never as an expected lift.

What Google Search does with your page before the click

Google Search prefetches the first two search results with a speculation rule, and that head start belongs to results one and two and to no others. It was one of the first uses of speculation rules. Prefetching has been enabled by default on Search on Android since October 2022 and was rolled out to desktop by September 2024.

The mechanism is a list rule over two URLs. For a cross-origin prefetch the request goes through an anonymous client IP proxy, and the referrer policy is strict-origin, so your site sees a request without the visitor's address or full referrer. That request is the one your server has to answer well.

Two limits narrow who benefits:

  • Visitors with cookies for the site. If a visitor already has cookies for your site, they may receive different results based on those cookies, and Chrome won't use the prefetched HTML. Returning visitors therefore do not get the head start. New visitors do.
  • Results three and later. On desktop these prefetch only on hover, and the gain was 9.5 ms on LCP. On mobile, where hover is usually not available, Chrome saw no real improvement and did not enable the additional prefetches.

You add nothing to your page to receive this, because the rule belongs to Google. What the page can control is the request prefetch makes: a cookieless first request, which should be cacheable and fast. A slow origin response gives the head start away. We make no claim about rankings here, and the sources behind these numbers make none either.

Why Core Web Vitals reports do not show the gain

Site-level Core Web Vitals will not show speculation rules working, and in the field they currently show the opposite. CoreDash's November 2026 crawl covered 236,675 sites. In its posture panel of 231,975 sites, 35.6% have speculation rules, and 98% of those use prefetch.

Bar chart of speculation posture across 231,975 sites: 64.4% have no rules, 34.8% prefetch, 0.6% prerender and 0.2% prerender until script.
Share of the 231,975 sites in CoreDash's posture panel by speculation posture, November 2026 (none, prefetch, prerender, prerender until script).

On the separate subset of 141,631 sites with phone field data, 73% of prefetch sites have good LCP against 82% of all sites, a 9-point gap (82 minus 73). That gap is selection and doesn't measure the feature. Adopters are mostly default installs, so the group is "sites on platforms that ship the default" rather than "sites that tuned their loading." Nothing here says prefetch slows a site down.

Chrome's own guidance explains why the gain stays hidden even when it's real. Sites may be made up mostly of other navigation types, such as landing pages. Or their same-origin navigations may already be fast enough that a dramatic improvement can't move the 75th percentile metrics.

For fix order by failing sub-part and how long a change takes to appear in field data, see how to improve Core Web Vitals.

Run this test instead of reading the site-level report:

  1. Segment your own navigations into speculated and not speculated. The Sec-Purpose request header and the document.prerendering property let you label them.
  2. Compare LCP per speculated navigation against matched non-speculated ones on the same templates.
  3. Run it as an experiment with a start date and a pre-agreed read-out, using a growth experiment framework, so the result survives the next release.

Which setup fits your site

Most sites should start with a site-wide prefetch at conservative or moderate eagerness and add prerender only on a few hot paths; the matrix gives the posture per site type. The cells are our recommendations built from the evidence above, and each row names where the evidence comes from.

Site typePostureEagernessExclusionsMain riskEvidence
WordPress core defaultsKeep core's prefetch; extend for hot pathsConservative (core default)Core already skips logged-in users and sites without pretty permalinksSmall, the default is already onWordPress core default
Content or blog site on another CMSSite-wide prefetch from a document ruleModerateLogout, preview and search-result URLsExtra backend load, and moderate speculates more links on mobileShopify's 0.7% traffic cost; Chrome PSA
Shopify LiquidKeep the default Speculation-Rules header; add prerender on hot pathsConservativeCart-changing endpointsStale cart stateShopify docs
Custom ecommercePrefetch listing-to-product links; prerender the first product tilesModerate on desktop, immediate on mobile tilesAccount, cart, checkoutPrerender cap of two or ten, and one-case evidenceRay-Ban; Chrome cap
SaaS marketing site with app behind loginPrefetch marketing and pricing pagesConservative to moderateApp paths, loginScripts and analytics firing early on prerenderChrome's prerender behaviour
Logged-in dashboardNo rules-Whole appResponses change with cookiesRecommendation

Prefetch first is the sound default, because a prefetch fetches the HTML only and a wrong guess stays cheap. Start there, run the per-navigation test above, and promote to prerender only the hot paths you can name. A hot path is a page most visitors reach from one predictable link, such as a product tile list or the pricing page from the home page.

On WordPress, the core default already does the base job, so the work is auditing what it skips. Our wordpress seo checklist lists what core, theme and plugins each own. On Shopify, the platform ships the header for you, and the shopify store seo guide covers the speed and app edits where defaults tend to break.

The cost to budget is extra backend load. Shopify measured about 0.7% extra storefront traffic for its conservative default, and moderate on mobile speculates more links than conservative does.

If your origin is already near capacity, begin conservative and widen later. A site with no rules today has a clean baseline: your current numbers are the "no rules" case you compare against.

A copy-ready rule set for a store

A store can start with one document rule that prefetches product and collection links at moderate eagerness, excludes account, cart and checkout paths, and adds a prerender rule only for the first product tiles.

This speculation rules example uses only documented properties (prefetch, prerender, where, and, not, href_matches, selector_matches, eagerness) and is our recommendation. The paths and class names are placeholders for yours, and the selector_matches rule near the end gives editors an opt-out class.

html
<script type="speculationrules">
{
  "prefetch": [
    {
      "where": {
        "and": [
          { "href_matches": "/*" },
          { "not": { "href_matches": "/account/*" } },
          { "not": { "href_matches": "/cart" } },
          { "not": { "href_matches": "/checkout*" } },
          { "not": { "href_matches": "/logout" } },
          { "not": { "selector_matches": ".no-prerender" } }
        ]
      },
      "eagerness": "moderate"
    }
  ],
  "prerender": [
    {
      "where": { "selector_matches": ".top-tile a" },
      "eagerness": "immediate"
    }
  ]
}
</script>

The same JSON can live in a file and be referenced by the Speculation-Rules response header, which is how Shopify ships its default, so the rule set arrives with no template change:

http
Speculation-Rules: "/speculation-rules.json"

Two details do most of the safety work. The not clauses keep speculation away from logout, cart and checkout, where an early request can change state. The .no-prerender selector gives editors a one-class opt-out for any link. For cart-changing endpoints, Shopify also sends Clear-Site-Data: "prefetchCache", "prerenderCache" on the response, which purges speculated copies when the cart changes; other state changes remain yours to handle.

The prerender rule follows Ray-Ban's device split. On mobile, Ray-Ban used immediate eagerness on the first four tiles, the ones with the most clicks, since hover is largely unavailable on mobile devices.

On desktop it prerendered on hover over product tiles with moderate eagerness, passing the tiles' identifying class as the selector. The snippet marks the most-clicked tiles with a .top-tile class, and your analytics tell you which tiles earn it.

Two code panels comparing Ray-Ban's mobile prerender rule, immediate on the top tiles, with its desktop rule, moderate on hover.
Ray-Ban's device split: immediate eagerness on mobile tiles, moderate on hover for desktop.

Remember what that split produced. Even a carefully targeted rule prerendered only 29% of mobile visits, against 50% on desktop, which is why its conversion cohorts mix prerendered and server-served visits and why you shouldn't read +101.47% as your forecast. If you run a catalogue, the ecommerce seo checklist covers the catalogue-level fixes that sit before this one.

Verify before shipping. Open Chrome DevTools, check the Application panel's speculative loads view for the rules it parsed and the status of each speculation, and confirm that the excluded paths never appear. Then ship to a single template, label the speculated navigations, and read the result per navigation.

Budget tens to a couple of hundred milliseconds per speculated navigation (Shopify's mobile median is about 20 ms), treat Ray-Ban's prerender as one measured case, and expect neither a Core Web Vitals promise nor a revenue promise from the feature. The next step is small: add the prefetch rule to one template this week, label the navigations it speculates, and compare their LCP with the unspeculated ones.

Frequently asked questions

Is speculation rules the same as the prerendering SEOs mean?

No. Speculative prerendering is a browser feature: Chrome loads a page in the visitor's browser before the click. Static prerendering produces HTML ahead of time on the server. We migrated our own React single-page app to prerendered static HTML for 20 marketing pages because AI crawlers do not execute JavaScript. For how search engines render pages, see our guide to javascript rendering.

Will I get Ray-Ban's conversion lift?

Don't plan on it. Ray-Ban's +101.47% mobile figure compares visitors on the page served from the server with visitors on the prerendered page, and only part of the visits were prerendered at all. The case study does not say how visitors were assigned, so the cohorts may differ in more than the speculation rule. Treat the figure as one case on one page.

Does it work with React?

Speculation rules React setups work, with one limit. Rules can be placed in the HTML your React app serves, or injected as a script element. They act on full page navigations, and a client-side route change loads no new document, so there is nothing to speculate. The rules help most when your app links between real URLs.

Does it work in Safari or Firefox?

Speculation rules Safari support has not shipped as of November 2026, and Firefox has only announced a prototype, so both ignore the rules silently, so visitors on those browsers are unaffected, but they don't get the speed benefit either. The rule set is safe to ship everywhere. Expect the gains to come from Chromium-based browsers, and read your own data by browser before judging.

Why are my rules not working?

Check the Preload pages setting in Chrome first, since turning it off disables speculative loading. Then look at the response: error status codes are not speculated. Extensions can also interfere. Open the speculative loads panel in Chrome DevTools to see whether each rule was parsed and why a given URL was skipped.

How do I detect a prefetched or prerendered request?

On the server, a prefetch or prerender request carries the Sec-Purpose header. In the page, the document.prerendering property is true while the page is prerendered. Use both to keep analytics, ads and stateful scripts from firing until the visitor actually arrives, and to label speculated navigations for the per-navigation test.

What is the difference from link preload?

Preload tells the browser to fetch a resource the current page needs, such as a font or hero image, sooner. Speculation rules load a future page, either its HTML alone through prefetch or the whole page through prerender. They solve different problems, and a page can use both.

Can I add rules with JavaScript?

Yes, speculation rules JavaScript injection works. You can insert a script element of type speculationrules into the document with JavaScript, for example after your code knows which links are the likely next steps. That makes it possible to build rules from your own click data. A static rule or the Speculation-Rules header is simpler when your hot paths are known in advance.

Cite this page

Aktaş, F. (2026, November 29). Speculation Rules API: What It Saves and When to Use It. Mission Growth. https://missiongrowth.io/blog/speculation-rules-api

Download the data: 1 table as CSV (CC BY 4.0)

Figures we made for this post are free to reuse under CC BY 4.0 with credit to Mission Growth.

Up nextHow to Improve Core Web Vitals: 2026 Pass Rates and Fix Order
21 min read
Next step

Put these playbooks to work

Start with a free audit. See where the lift is before you commit.

How it works

  1. 01

    30-minute audit call

    We map your funnel against your goal and pull live data from your channels.

  2. 02

    Lift estimate

    You get a written estimate of where the lift is, with a 30-day plan to capture it.

  3. 03

    You decide

    Run it with us, run it in-house, or shelve it. No commitment from the audit.