← Back to release summary

Speculation rules: document-sourced rules

Category
Performance
Type
New or changed feature
Status
Enabled by default (Chrome 121)
Intent stage
Origin Trial

Summary

An extension to speculation rules syntax that lets the browser obtain URLs for speculation from link elements in a page. They may include criteria which restrict which of these links can be used.

Motivation

Provides a more powerful and convenient mechanism for specifying URLs for pre-navigation speculation, instead of directly listing URLs. It takes into account current links in the document (which can dynamically change), and allows developers to specify pattern-based allow/deny lists, which is more convenient in scenarios where a page contains a large number of links or dynamic content, and it may not be convenient for the author to synchronize this information with a separate list.

Standards & signals

Explainers: https://github.com/WICG/nav-speculation/blob/main/triggers.md#document-rules

View on chromestatus.com