← Modern UI
Speculation Rules
Probing…Speculation Rules is a web platform capability in the Modern UI category. Prerender likely next pages for instant navigation. Supported in Chromium 109+; not available in Firefox and Safari. Requires a secure context (HTTPS or localhost).
Secure context
Try it
Loading demo…
Code
const script = document.createElement('script')
script.type = 'speculationrules'
script.textContent = JSON.stringify({
prerender: [{ urls: ['/capability/dialog'] }],
})
document.head.appendChild(script)
// The browser may now prerender that URL — navigation can be instant.Browser support
Chromium
109
Firefox
No
Safari
No
Frequently asked questions
Which browsers support Speculation Rules?
Supported in Chromium 109+; not available in Firefox and Safari.
Does Speculation Rules require HTTPS?
Yes. Speculation Rules needs a secure context, so it only works over HTTPS (or on localhost during development).
What is Speculation Rules used for?
Prerender likely next pages for instant navigation.
Can I try Speculation Rules in my browser?
Yes. shwcs.net runs a live Speculation Rules demo that probes your current browser and lets you try the API. Everything runs locally — nothing is sent anywhere.