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.
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.
The entire speculative loading feature is a progressive enhancement, so in general risks are low in this area.
Due to how new fields in speculation rules are interpreted in older versions of Chrome, using this field on the rule level can cause the rules to be dropped. A workaround is using it on the ruleset level only during this transition period. https://github.com/WICG/nav-speculation/blob/main/speculation-rules-tags.md#location-of-the-tags-within-the-json
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
We would like to use the presence of ruleset-level tags to improve DevTools's existing display of speculation rules rulesets: https://issues.chromium.org/issues/393408589
No milestones specified