Skip to Content
Platform.Ontology

Speculation Rules prefetch and prerender

A page can load a likely next page early, so a site may see a request before the person visits.

Used to track youTracking across apps and sitesBefore the visitWeb browsersBefore you visit

In one line

Can load a likely next page early, so a site may see a visit first

A page can load a likely next page early, so a site may see a request before the person visits.

Prefetch or prerender makes the destination server log a hit, and run scripts, before any click, sending Sec-Purpose: prefetch;prerender. Analytics can over count; cookies from a prefetched response apply only on activation.

What it can and can't do

What the user does: Nothing. It happens when a page guesses where you will go next

It can

  • Load a likely next page before you click
  • Show the next page almost instantly when you click
  • Let the next site see a request before you visit

It cannot

  • Run in Firefox or Safari
  • Run when Chrome's data saver is on or the connection is poor
  • Show you the page until you click, or count it as a visit in some tools
  • Load pages from a different site without extra signals

How it differs between platforms: Chrome, Edge and Samsung Internet support it. Firefox and Safari do not.

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported1082022-11-29None
EdgeSupported1082022-12-05None
FirefoxNot supportedNot availableNot listedNone
SafariNot supportedNot availableNot listedNot supported at time of research, verify
Safari on iPhoneNot supportedNot availableNot listedNone
Chrome on AndroidSupported1082022-11-29None
Samsung InternetSupported21.02023-05-19None

How a site asks for it

API<script type=speculationrules>; Sec-Purpose request header; document.prerendering
Browser compat keysapi.Document.prerendering
http.headers.Sec-Purpose
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsPrefetch cache about 5 minutes in Chrome
How to take it backClear site data, browser privacy settings
Inside an iframeNot listed

Data you get

What comes back: Sec-Purpose request header
Shape: string
How often: per speculative request

FieldTypeUnitRangePrecision
Sec-Purposestringtokenprefetch, prefetch;prerenderenum

Technical limits

  • Same-site prefetch carries cookies; cross-origin uses an isolated session without them
  • Not done when Data Saver or Save-Data is on, or in low memory
  • Chrome limits concurrent prefetch and prerender counts

The story

What it is

A page can load a likely next page early, so a site may see a visit before you click.

For you

You click a link and the next page appears almost at once. Behind the scenes, the browser loaded it before you clicked. The site may log a hit even if you never open it.

For makers

Instant page loads raise sales and reading time. But prefetching makes the server count a visit early and can run scripts before you arrive. Analytics must wait for activation to avoid inflated numbers.

Where you see it

TypeExampleApps
shoppingA shop prerenders the product page you are likely to open, so checkout feels fast.Shopify, Amazon
mediaA news site prefetches the next article so it opens instantly.The Guardian
gamesA game portal prefetches the page of the game you hover over, so it loads in a blink.Poki, CrazyGames
analyticsA tool must ignore hits from prefetched pages, or visit counts go up.Google Analytics
adsAn ad system waits for activation before it counts an impression.Google Ad Manager
utilitiesA search result page prerenders the top result so it opens at once.Google Search

Risks

  • Server sees visits you never made
  • Can inflate analytics

What the platform says

Good uses and abuse

Legitimate uses

  • Instant navigations

Known abuse

  • Phantom page views, privacy leak of intent before click

Scores

ScoreValueMeaning
Sensitivity2 of 5How revealing the data is
Utility4 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough identifying entropy, when known

History

  • 2022-11, Chrome 108: Prerender2 shipped for omnibox and speculation rules
  • 2024-04, Chrome 121: Speculation Rules eagerness, document rules

Sources

How well checked: Based on official documentation.

On this page