Free auditStart free
GlossaryGlossary · Performance

Speculation rules

Speculation rules tell the browser which pages to prefetch or prerender before a click. Syntax, eagerness levels, Chrome limits, and how to check them.

3 min
read
2
sources
Nov 1, 2026
updated
Scaplet Editorial Team
author
In one line

Speculation rules are JSON, placed in a script tag of type speculationrules, that tell the browser which likely next pages to prefetch or prerender. A prerendered page loads fully in a hidden tab and is shown on click. The browser treats the rules as a hint, so it may decline to speculate.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
`speculationrules`
Script type
`prefetch`, `prerender`
Actions
`immediate`
List rule default
`conservative`
Document rule default
01At a glance

Prefetch versus prerender

Chrome's documentation describes two actions. Prefetch downloads the next document and holds it in memory, without rendering it. Prerender goes further: it loads the whole page, JavaScript included, in a hidden tab and shows it when the user navigates. Prerender costs more memory and bandwidth.

What loads

Prefetch
The document response body only
Prerender
The full page, subresources and scripts

Where it waits

Prefetch
In memory
Prerender
In a hidden tab

Cost

Prefetch
Lower
Prerender
Higher memory and bandwidth

Cross-site

Prefetch
Allowed with conditions (see gotchas)
Prerender
Not supported

Chrome calls this a hint and a progressive enhancement. Unsupported browsers ignore the script, so adding it costs nothing for them. Per Chrome's docs, Firefox doesn't support it and Safari has it behind a flag.

03Eagerness values, per Chrome's documentation

Eagerness and Chrome's limits

Value

conservative

Trigger
Pointer or touch down on the link
Value

moderate

Trigger
Desktop: after 200 ms of hover, or pointer down if sooner. Mobile: viewport heuristics
Value

eager

Trigger
Desktop: after 10 ms of hover. Mobile: shortly after the link enters the viewport
Value

immediate

Trigger
As soon as the rules are observed
Chrome's per-page limits
EagernessPrefetchPrerender
immediate5010
eager or moderate, mobile6, oldest dropped first2, oldest dropped first
eager or moderate, desktop2, oldest dropped first2, oldest dropped first
conservative2, oldest dropped first2, oldest dropped first

Chrome also skips speculation under Save-Data, memory pressure, Energy Saver on low battery, when the Preload pages setting is off, and in background tabs. Measure with real users, because your own lab machine is rarely in these states.

04Checklist

Gotchas before you ship it

First2
CSP can block inline rules. MDN says inline speculation rules need inline-speculation-rules in script-src, together with a hash or nonce. See content security policy.
Cross-site is restricted. MDN says cross-site prerender isn't supported, and cross-site prefetch needs a strict enough referrer policy and a user with no cookies for the destination.
Next1
eager acts like immediate for list rules in current implementations, per MDN. Use document rules when you want hover-style triggers.
Then1
Rules in subframes are ignored, and rules in a prerendered page only apply after it is activated.
05How it works

Check it in 2 minutes

  1. 1

    Confirm the rules parse

    Run the snippet above. A SyntaxError means the JSON is invalid and, per MDN, no rules apply.

  2. 2

    Look in Chrome DevTools

    Chrome's docs say ruleset tags show in DevTools. The panel layout changes between versions, so check Chrome's current DevTools documentation for where speculation status appears.

  3. 3

    Watch your analytics

    Compare pageviews before and after rollout. A jump that doesn't match real traffic suggests tags firing during prerender.

DevTools console: feature detection and rule inspection
// true in browsers that understand the script type
HTMLScriptElement.supports('speculationrules');

// print every ruleset on the page
[...document.querySelectorAll('script[type=speculationrules]')]
  .map((s) => JSON.parse(s.textContent));
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Does speculation rules replace link rel=preload?

No. Preload fetches a resource the current page needs. Speculation rules fetch or render a whole next page. They solve different problems and can be used together. See preload.

02Which browsers support it?

Chrome's documentation lists Chrome and Edge as supporting it, Firefox as not supporting it, and Safari behind a flag. Because unsupported browsers ignore the script, it works as a progressive enhancement.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • chrome.com
  • mozilla.org
  1. 01Prerender pages in Chrome for instant page navigationsdeveloper.chrome.com · checked 2026-11-01
  2. 02script type=speculationrules (MDN)developer.mozilla.org · checked 2026-11-01
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly