Contact emails
dom...@chromium.org, jbr...@chromium.org, liviu...@chromium.orgExplainer
https://github.com/WICG/nav-speculation/blob/main/triggers.md#no-vary-search-hintSpecification
https://wicg.github.io/nav-speculation/speculation-rules.html#speculation-rules-processingSummary
Adds a hint to speculation rules that informs the navigation prefetch cache that the URL to be prefetched expects to receive the same No-Vary-Search header in the response.
The hint is useful because prefetches that depend on No-Vary-Search to match to navigations do not benefit the user if the navigation happens before prefetch headers return from the server. Using the hint, the web browser will expect, but verify, that the No-Vary-Search hint matches with the No-Vary-Search header. If the No-Vary-Search hint does not match the No-Vary-Search header received then the web browser will send a new request.
We would like to ship "No-Vary-Search Hint for Prefetch Speculation Rules" together with "No-Vary-Search support in navigation prefetch cache" (https://chromestatus.com/feature/5071247189213184).
Blink component
Internals>PreloadTAG review
Not applicable. The TAG has already given a negative opinion on the overall complexity of speculation rules (https://github.com/w3ctag/design-reviews/issues/721), so we anticipate it would not be a good use of their time to review additions to the syntax. The addition itself is small and any architectural questions about it would be covered under the general closed speculation rules review.TAG review status
Not applicableChromium Trial Name
NoVarySearchPrefetchOrigin Trial documentation link
https://developer.chrome.com/origintrials/#/view_trial/4146689356901384193
WebFeature UseCounter name
kSpeculationRulesNoVarySearchHintRisks
Interoperability and Compatibility
Gecko: No signal (
https://github.com/mozilla/standards-positions/issues/620#issuecomment-1608195274)
WebKit: No signal (
https://github.com/WebKit/standards-positions/issues/54#issuecomment-1608197504)
Web developers:
Google Search has been experimenting with No-Vary-Search header / Speculation Rules "expects_no_vary_search" (referred in this intent as No-Vary-Search hint for prefetch Speculation Rules). This functionality helps Google Search to match prefetched content to the next user navigation. Developers can use parameters in the prefetched URL that are not needed when navigating to the actual link (e.g. the source of the link click). The server can customize behavior using these parameters without causing a cache miss in the browser."expects_no_vary_search" addition to Speculation Rules allows the browser to completely handle the case where the user navigates to a URL that is currently prefetched by waiting for the ongoing prefetch instead of directly requesting the page from the server.Google Search conducted experiments prefetching Search results pages from the search box and other links that lead to another Search results page. There was significant latency improvement for navigating to Search result pages prefetched using No-Vary-Search header and "expects_no_vary_search".Other signals: No-Vary-Search Hint for Prefetch Speculation Rules has been discussed, together with No-Vary-Search header at
Web Perf WG meeting at TPAC 2023.
WebView application risks
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
Debuggability
The No-Vary-Search hint is represented as a new json attribute ("expects_no_vary_search") in prefetch Speculation Rules. The Speculation Rules can be viewed in DevTools on the Application tab under Preloading->Speculation Rules.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?
YesYeshttps://wpt.fyi/results/speculation-rules/prefetch/no-vary-search?label=master&label=experimental&aligned
Flag name on chrome://flags
Finch feature name
SpeculationRulesNoVarySearchHintRequires code in //chrome?
FalseEstimated milestones
Shipping on desktop | 121 |
OriginTrial desktop last | 120 |
OriginTrial desktop first | 115 |
DevTrial on desktop | 115 |
Shipping on Android | 121 |
OriginTrial Android last | 120 |
OriginTrial Android first | 115 |
DevTrial on Android | 115 |
Shipping on WebView | 121 |
OriginTrial webView last | 120 |
OriginTrial webView first | 115 |
Anticipated spec changes
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
NoneLink to entry on the Chrome Platform Status
https://chromestatus.com/feature/4887338302308352Links to previous Intent discussions
Intent to prototype: https://groups.google.com/a/chromium.org/g/blink-dev/c/HX2iHMBjg7s/m/Zu4L5-l_AQAJ