← Back to release summary
No-Vary-Search support for prerender
- Category
- Miscellaneous
- Type
- New or changed feature
- Status
- In developer trial (Behind a flag) (Chrome 127)
- Intent stage
- None
Summary
Enables a prerender entry to match even if URL query parameters change. The No-Vary-Search HTTP response header declares that some or all parts of a URL's query can be ignored for cache matching purposes. It can declare that the order of query parameter keys should not cause cache misses, that specific query parameters should not cause cache misses or that only certain known query parameters should cause cache misses. It could apply to multiple caches, but this entry refers to support for prerender.
Motivation
Caching is useful for making web pages load faster, and thus creating better user experiences.
One of the most important cache keys for web resources is the resource's URL. However, sometimes multiple URLs can represent the same resource. This leads to caches not always being as helpful as they could be: if the browser has the resource cached under one URL, but the resource is then requested under another, the cached version will be ignored.
Via a new HTTP header, No-Vary-Search, resources can declare that some or all parts of the query can be ignored for cache matching purposes.
This feature is focused on adding support for No-Vary-Search header to the prerender cache.
Standards & signals
- Specification: https://wicg.github.io/nav-speculation/no-vary-search.html
- Firefox: Positive
- 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".
- Tracking bug: https://issues.chromium.org/issues/41494389
Explainers: https://github.com/WICG/nav-speculation/blob/main/no-vary-search.md#prerendering-activation
View on chromestatus.com