Web features explorer

Speculation rules

Limited availability

Speculation rules are hints to the browser to proactively download pages in the background so they appear instantly when the user navigates to them.

Browser support

  • Chrome 109 Released on 2023-01-10
  • Chrome Android 109 Released on 2023-01-10
  • Edge 109 Released on 2023-01-12
  • Firefox Not supported Position: neutral (concerns: complexity) Bugs: 1969396 1969838
  • Firefox for Android Not supported Position: neutral (concerns: complexity) Bugs: 1969396 1969838
  • Safari Not supported Bugs: 295193
  • Safari on iOS Not supported Bugs: 295193

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.

MDN documentation

Usage (according to Chrome Platform Status)

~11.775% of page loads. More data at chromestatus.com.

Developer use cases

  • My company has a web app in which users can create, edit, and save documents. The app's landing page is the documents list, from which users can open their documents in a proprietary editor in a new tab. The editor has many features, so it loads and evaluates several megabytes of assets. Even with request & bytecode caching, loading and evaluating assets is pretty slow. With the Speculation Rules API (specifically prerendering), I can start asset load and evaluation before a user opens their document, and then use the Broadcast Channel API to tell the prerendered page what document to open. My company has a web app in which users can create, edit, and save documents. The app's landing page is the documents list, from which users can open their documents in a proprietary editor in a new tab. The editor has many features, so it loads and evaluates several megabytes of assets. Even with request & bytecode caching, loading and evaluating assets is pretty slow. With the Speculation Rules API (specifically prerendering), I can start asset load and evaluation before a user opens their document, and then use the Broadcast Channel API to tell the prerendered page what document to open. [see original comment]
  • Intelligently prefetch pages using my existing, simple Rails-based stack without cumbersome SPA/ frontend framework dependencies. Unlike the existing prefetch it would be nice to not have to be careful around cache settings in order for this to work. Intelligently prefetch pages using my existing, simple Rails-based stack without cumbersome SPA/ frontend framework dependencies. Unlike the existing prefetch it would be nice to not have to be careful around cache settings in order for this to work. [see original comment]
  • Improve performance for my web apps without resorting to SPA frameworks. Service Workers and Cache API have come a long way towards making MPA apps comparable to SPAs. Speculation rules will close the gap further while providing an ergonomical API. Improve performance for my web apps without resorting to SPA frameworks. Service Workers and Cache API have come a long way towards making MPA apps comparable to SPAs. Speculation rules will close the gap further while providing an ergonomical API. [see original comment]