Speculation Rules (prefetch and prerender)
A page can tell the browser to load and render the next page in the background.
In one line
Can tell your browser to load the likely next page before you tap
A page can tell the browser to load and render the next page in the background.
A site can preload other URLs the person may visit. Prerendered pages run scripts before the person arrives, so analytics and counters may fire on a visit that never happens.
What it can and can't do
What the user does: Nothing. It happens as you hover over or get close to a link.
It can
- Load the next page in the background before you tap it
- Show the next page right away when you do tap
- Pick pages to preload on its own site
It cannot
- Preload pages when your browser has data saver or low power on
- Run the other page's sign in or purchase actions
- Preload pages from other sites with your logged in details
- Work in Firefox
How it differs between platforms: Chrome and Edge and Safari support it. Firefox does not yet.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 109 | 2023-01-10 | None |
| Edge | Supported | 109 | 2023-01-12 | None |
| Firefox | Not supported | Not available | Not listed | In preview builds only |
| Safari | Supported | 27.3 | Not listed | None |
| Safari on iPhone | Supported | 27.3 | Not listed | All iOS browsers use WebKit |
| Chrome on Android | Supported | 109 | 2023-01-10 | None |
| Samsung Internet | Supported | 21.0 | 2023-05-19 | None |
How a site asks for it
| API | <script type=speculationrules>{"prerender":[...]}</script>; Speculation-Rules header |
| Browser compat keys | html.elements.script.type.speculationrules |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | While the page is open; discarded when not used |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Same-site prerender by default; cross-origin prefetch needs opt-in |
Typical flow
- Page injects speculation rules
- Browser fetches or prerenders per eagerness
- Navigation activates the prerendered page
Data you get
Shape: none
No individual data fields. The signal is the access itself.
Technical limits
- Chrome limits: eagerness immediate or eager up to 50 prefetches and 10 prerenders; moderate or conservative up to 2 (FIFO)
- Disabled when Data Saver or Energy Saver is on, when Preload pages is off, or memory is low
- Prerendered pages defer permission prompts, notifications, geolocation and other sensitive APIs until activation
- Cross-origin prerender is not allowed; same-site cross-origin prefetch needs opt in
- Support per MDN BCD: Chrome and Edge 109, Safari 27.3; Firefox has not shipped it
The story
What it is
A page can tell the browser to load the next page before you click it.
For you
The next page appears almost instantly when you click. What you do not see is that your browser may have loaded it for you earlier, even if you never opened it.
For makers
Makers bet on where you will click next and load it early to boost speed, which lifts search ranking and sales. The cost is extra data use and the site may count visits you never made.
Where you see it
| Type | Example | Apps |
|---|---|---|
| shopping | On a store listing, the top product page is loaded in the background so tapping it feels instant. | Shopify stores, Amazon |
| news | A news site prerenders the next top story from the home page. | None named |
| media | A streaming service prefetches the title page of a show you are hovering over. | None named |
| analytics | Analytics must avoid counting prerendered pages that the person never actually viewed. | Google Analytics |
| ads | An ad system waits to count an impression until a prerendered page is really shown. | None named |
| travel | A booking site prerenders the next step of search results. | None named |
Risks
- Phantom page loads
- Extra data use
What the platform says
- Google: Prerender pages in Chrome. Chrome's docs say prerendering the likely next page can make navigation feel instant.
Good uses and abuse
Legitimate uses
- Instant navigations
Known abuse
- Phantom analytics hits
- Loading pages to disclose IP or cookies before click
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 2 of 5 | How revealing the data is |
| Utility | 4 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2023-01, Chrome 109: Prefetch and prerender via speculation rules
- 2023-12, Chrome 121: Document rules and eagerness
Related capabilities
Related
- Fenced frames. Can embed a box of content that the page around it cannot look into
Sources
How well checked: Based on official documentation.