Skip to content

Add the "speculationrules" destination - #1952

Open
vickiez wants to merge 4 commits into
whatwg:mainfrom
vickiez:speculation-rules-destination
Open

Add the "speculationrules" destination#1952
vickiez wants to merge 4 commits into
whatwg:mainfrom
vickiez:speculation-rules-destination

Conversation

@vickiez

@vickiez vickiez commented Aug 20, 2026

Copy link
Copy Markdown

This destination is used when fetching speculation rule sets, whether via the
Speculation-Rules HTTP response header or an external
<script type=speculationrules src> element. It is governed by the
speculation-rules-src CSP directive.


Supersedes #1841, whose commit is included here unchanged and with its
authorship preserved. On top of it, this PR:

  • fixes the illustrative destination table's "" initiator rowspan, which was
    not grown when the new row was added, leaving the table a cell short
    (editorial);
  • moves "speculationrules" out of the "no CSP directive" grouping and gives it
    the speculation-rules-src directive; and
  • notes that the destination also covers external
    <script type=speculationrules src> elements, not just the header.

Note that HTML's "process the Speculation-Rules header" already creates
requests whose destination is "speculationrules", so this value is referenced
today without being defined here.

Related pull requests

(See WHATWG Working Mode: Changes for more details.)


Preview | Diff

domenic and others added 4 commits August 20, 2026 16:40
Part of whatwg/html#11426, for requests initiated by the `Speculation-Rules` HTTP header.
The "speculationrules" row was added inside the "" initiator group without
growing that group's rowspan, leaving the table a cell short.
w3c/webappsec-csp#808 defines the speculation-rules-src fetch directive
for the "speculationrules" destination, so it is no longer exempt from
CSP's fetch directives.
whatwg/html#11697 gives external <script type=speculationrules src> the
"speculationrules" destination, routing it through the same fetch
algorithm as the Speculation-Rules header.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants