-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add speculation rules improvements for Chrome 121 #22262
Add speculation rules improvements for Chrome 121 #22262
Conversation
html/elements/script.json
Outdated
"source_document": { | ||
"__compat": { | ||
"description": "<code>source</code> key <code>document</code> value", | ||
"support": { | ||
"chrome": { | ||
"version_added": "121" | ||
}, | ||
"chrome_android": "mirror", | ||
"edge": "mirror", | ||
"firefox": { | ||
"version_added": false | ||
}, | ||
"firefox_android": "mirror", | ||
"ie": { | ||
"version_added": false | ||
}, | ||
"oculus": "mirror", | ||
"opera": "mirror", | ||
"opera_android": "mirror", | ||
"safari": { | ||
"version_added": false | ||
}, | ||
"safari_ios": "mirror", | ||
"samsunginternet_android": "mirror", | ||
"webview_android": "mirror" | ||
}, | ||
"status": { | ||
"experimental": true, | ||
"standard_track": true, | ||
"deprecated": false | ||
} | ||
} | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chrisdavidmills we crossed our streams again :-)
I think we can remove this bit as I added this as a url
and where
parameters in #22188. We're making source: url
and source: document
optional (and maybe eventually removing it?) as it can be implied from whether url
and where
exists. Therefore don't think we should add that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also a bit weird it being its own standalone item...it would make a bit more sense if it were a subitem of source
, but no.
I'll remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! 👍
Summary
Chrome 121 has added several new features for the Speculation Rules API:
Speculation-Rules
HTTP response header, which allows developers to set speculation rules on a page via a response header, without modifying the actual page code. I added a new BCD feature for the header. See https://chromestatus.com/feature/5069400512659456 for more info.source
key value,document
; the relatedwhere
key is already included in the data. See https://chromestatus.com/feature/5112150536749056eagerness
field, which allows developers to set how eagerly they want URLs to be prefetched/prerendered. I added a sub-feature foreagerness
. See https://chromestatus.com/feature/5091678266851328.No-Vary-Search
HTTP response header, which is used to indicate whether URL params should be ignored when deciding whether to fetch a page from cache or not. New feature added for the header. See https://chromestatus.com/feature/5071247189213184expects_no_vary_search
field, which allows developers to report the expected value of theNo-Vary-Search
response header in the speculation rules, and use that to determine whether a prefetch would be beneficial or not. New sub-feature added for this field. See https://chromestatus.com/feature/4887338302308352Test results and supporting details
Related issues