Speculation-rules prefetch requests omit the Sec-Speculation-Tags header
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: sning, Assigned: sning)
References
(Blocks 2 open bugs)
Details
(Whiteboard: [fxpe])
Attachments
(1 external file)
Speculation-rules prefetch requests omit the Sec-Speculation-Tags
header, even though the parsed tags are carried into the prefetch record.
In the Firefox 161.0a1 WPT run from 2026-10-26, both of these tests
successfully use the prefetched response, then fail when checking the tags:
speculation-rules/speculation-tags/prefetch-eagerness-pointer-down.https.html
Expected:"conservative", "moderate"
Actual:__no_tags__speculation-rules/speculation-tags/prefetch-eagerness-pointer-hover.https.html
Expected:"moderate"
Actual:__no_tags__
The failure is therefore no longer a missing eagerness trigger or a failure
to reuse the prefetched response.
Expected:
Send Sec-Speculation-Tags with the applicable collected tags, following
the serialization and cross-site restrictions in the specification.
Implementation notes:
SpeculationRulesManager already passes the tags to PrefetchRecordParent,
which stores them in mTags. The request setup currently sets Sec-Purpose,
but does not appear to set Sec-Speculation-Tags.
Tests:
https://tests.firefox.dev/test.html?test=speculation-rules/speculation-tags/prefetch-eagerness-pointer-down.https.html
https://tests.firefox.dev/test.html?test=speculation-rules/speculation-tags/prefetch-eagerness-pointer-hover.https.html
Specification:
https://html.spec.whatwg.org/multipage/speculative-loading.html#the-sec-speculation-tags-header
Updated•1 month ago
|
Updated•1 month ago
|
| Assignee | ||
Comment 1•1 month ago
|
||
The header is re-evaluated on every redirect and only sent to destinations that
are same-site with the referring document, as the speculation-tags WPTs expect.
The prefetch spec compares with the prefetch record's URL instead, which would
also tag cross-site prefetches.
Updated•28 days ago
|
Updated•28 days ago
|
Updated•17 days ago
|
Comment 3•15 days ago
|
||
| bugherder | ||
Updated•6 days ago
|
Description
•