Skip to content

Speculation Rules API #1335

Open
Open

Description

@o-t-w

Description

Speculation rules offer a way to preemptively load pages for future navigations before the user has actually clicked a link.
Developers can opt to either prefetch, prerender or prerender_until_script.

Specification

https://html.spec.whatwg.org/multipage/speculative-loading.html#speculative-loading

web-feature

https://web-platform-dx.github.io/web-features-explorer/features/speculation-rules/

Test Links

https://wpt.fyi/results/speculation-rules?label=master&label=experimental&aligned&q=speculation

Additional Signals

The Speculation Rules API has been supported in Chrome and Edge since version 109.
The feature has 25 👍 in the developer signals repo.
Speculation Rules had 40 👍 In Interop 2026 and 30 👍 in Interop 2025.

Standards positions:

There are certain aspects of the spec that still seem to be in progress:

  • Chromium has an in-progress bug for adding external file support. There is an open pull request for adding this to the specification. There are separate Mozilla and Webkit standards positions for using an external speculationrules file rather than inlining.
  • Chrome has been running an origin trial for prerender-until-script

The State of HTML 2025 survey revealed that a majority of developers have not yet heard of this feature, but it is already being used by some large companies such as Shopify, WordPress, Etsy and Google.
This tweet about the API has 558 likes and this other tweet has 1000 likes.

Activity

  1. github-actions commented on Sep 3, 2026

    @github-actions

    This comment was automatically generated based on the information you provided. Please don't edit it.

    Below is additional information about the web feature (from the web-features project) which is referenced in your proposal.
    If this doesn't accurately correspond to your proposal, please update your initial comment to include web-features: <feature-id>.
    To find feature IDs, use the web-features explorer.

    Feature Speculation rules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions