← Back to release summary
No-Vary-Search Hint for Prerender Speculation Rules
- Category
- Miscellaneous
- Type
- New or changed feature
- Status
- In developer trial (Behind a flag) (Chrome 127)
- Intent stage
- None
Summary
Adds a hint to speculation rules that informs the navigation prerender cache that the URL to be prerendered expects to receive the same No-Vary-Search header in the response.
The hint is useful because prerenders that depend on No-Vary-Search to match to navigations do not benefit the user if the navigation happens before prerender 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.
Motivation
Adds a hint to speculation rules that informs the navigation prerender cache that the URL to be prerendered expects to receive the same No-Vary-Search header in the response. The hint is useful because prerenders that depend on No-Vary-Search to match to navigations do not benefit the user if the navigation happens before prerender 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.
Standards & signals
- Specification: https://wicg.github.io/nav-speculation/prerendering.html
- Firefox: Neutral
- Safari: No signal
- Web developers: No signals — Below is the text from the I2S of the No-Vary-Search on navigational prefetch, and we believe the same applies to Prerendering.
Google Search has been experimenting with No-Vary-Search header / Speculation Rules "expects_no_vary_search". 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".
Explainers: https://github.com/WICG/nav-speculation/blob/main/triggers.md#no-vary-search-hint
View on chromestatus.com