Speculation-Rules HTTP response header. Summary:
The
Speculation Rules API allows pages to declare hints about likely future
navigations using a JSON-based script element, enabling the browser to
speculatively prefetch target URLs in the background. When the user
eventually navigates, the response is already in cache and the page
loads significantly faster. This initial prototype covers same-origin
prefetch only. Cross-origin prefetch is out of scope and will be
addressed in a follow-up.
Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1969396
Specification:
https://html.spec.whatwg.org/multipage/speculative-loading.html#speculative-loading
https://wicg.github.io/nav-speculation/prefetch.html
Standards Body:
WHATWG
Platform Coverage:
All
Preference:
dom.speculation-rules.prefetch.enabled
DevTools Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=2037321
Extensions Bug: N/A
Use Counter: N/A
Standards-Positions Discussion:
https://github.com/mozilla/standards-positions/issues/620
Other Browsers:
Blink: Shipped (Chrome 110, February 2023)
WebKit: Actively implementing (same-origin prefetch landed in WebKit trunk)
web-platform-tests:
https://wpt.fyi/results/speculation-rules