← Back to release summary

Speculation rules: tag field

Category
Performance
Type
New or changed feature
Status
In development (Chrome In development)
Intent stage
None

Summary

This enables developers to add tag field to speculation rules. This optional field can be used to track the source of speculation rules, e.g. to treat them differently at an intermediary server. Any tags associated with a speculation will be sent with the Sec-Speculation-Tags header.

Motivation

There may be multiple parties on a single referring page which are setting up speculation rules, e.g. CDNs, frameworks, or individual pages. It can be useful for server code to respond differently to speculative navigation requests, depending on which source triggered them. Today, there is no way for servers to perform this kind of differentiation. All speculative navigation requests appear the same to the server. This feature provides such a mechanism.

Standards & signals

Explainers: https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md

View on chromestatus.com