No-Vary-Search header

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The HTTP No-Vary-Search response header specifies a set of rules that define how a URL's query parameters will affect cache matching. These rules dictate whether the same URL with different URL parameters should be saved as separate browser cache entries.

This allows the browser to reuse existing resources despite mismatching URL parameters to avoid the expense of fetching the resource again, when the same content will be returned.

Header type Response header

Syntax

http
No-Vary-Search: key-order
No-Vary-Search: params
No-Vary-Search: params=("param1" "param2")
No-Vary-Search: params, except=("param1" "param2")
No-Vary-Search: key-order, params, except=("param1")

Directives

key-order Optional

Indicates that URLs will not be cached as separate entries if the order in which parameters appear in the URL is the only difference. The presence of other parameters will cause URLs to be cached separately.

params Optional

Either a boolean or a list of strings:

  • As a boolean (params), it indicates that URLs that differ only by their parameters will not be cached as separate entries.
  • An inner list of space-separated strings (params=("param1" "param2")). Indicates that URLs that differ only by the listed parameters will not be cached as separate entries. The presence of other parameters will cause them to be cached separately.
except Optional

An inner list of space-separated strings (except=("param1" "param2")). Indicates that URLs that differ only by the listed parameters will be cached as separate entries. A boolean params directive has to be included for it to take effect (params, except=("param1" "param2")). The presence of other parameters that are not in the except= list won't cause URLs to be cached as separate entries.

Description

Relationship with the Speculation Rules API

The Speculation Rules API supports using the No-Vary-Search header to reuse an existing prefetched or prerendered page for different URL parameters — if they are included in the No-Vary-Search header.

Warning: Additional care must be taken when using prerender with No-Vary-Search since the page may initially be prerendered with different URL parameters. No-Vary-Search is used for URL parameters that deliver the same resource from the server, but are used by the client for various reasons (client-side rendering, UTM parameters for analytics measurement, etc.). As the initial prerender may be for different URL parameters, any code depending on them should only run after prerender activation.

The Speculation Rules API can also include an expects_no_vary_search field, which indicates to the browser what the expected No-Vary-Search value will be (if any) for documents that it is receiving prefetch/prerender requests for via the speculation rules. The browser can use this to determine ahead of time whether it is more useful to wait for an existing prefetch/prerender to finish, or start a new fetch request when the speculation rule is matched. See the "expects_no_vary_search" example for an explanation of how this can be used.

Examples

Allowing responses from URLs with differently ordered params to match the same cache entry

If you have for example a search page that stores its search criteria in URL parameters, and you can't guarantee that the parameters will be added to the URL in the same order each time, you can allow responses from URLs that are identical except for the order of the parameters to match the same cache entry using key-order:

http
No-Vary-Search: key-order

When this header is added to the associated responses, the following URLs would be treated as equivalent when searching the cache:

https://search.example.com?a=1&b=2&c=3
https://search.example.com?b=2&a=1&c=3

The presence of different URL parameters, however, will cause these URLs to be cached separately. For example:

https://search.example.com?a=1&b=2&c=3
https://search.example.com?b=2&a=1&c=3&d=4

The below examples illustrate how to control which parameters are ignored in the context of cache matching.

Allowing responses from URLs with a different param to match the same cache entry

Consider a case where a user directory landing page, /users, has already been cached. An id parameter might be used to bring up information on a specific user, for example /users?id=345. Whether this URL should be considered identical for cache matching purposes depends on the behavior of the application:

  • If this parameter has the effect of loading a completely new page containing the information for the specified user, then the response from this URL should be cached separately.
  • If this parameter has the effect of highlighting the specified user on the same page, and perhaps revealing a pullout panel displaying their data, then it would be better for the browser to use the cached response for /users. This could result in performance improvements around the loading of the user pages.

If your application behaves like the second example described above, you could cause both /users and /users?id=345 to be treated as identical for caching purposes via a No-Vary-Search header like so:

http
No-Vary-Search: params=("id")

Note: If a parameter is excluded from the cache key using params, if it is included in the URL it will be ignored for the purposes of cache matching, regardless of where it appears in the parameter list.

Allowing responses from URLs with multiple different params to match the same cache entry

Say you also had URL parameters that sorted the list of users on the page in ascending or descending alphabetical order, and specified the language to display the UI strings in, for example /users?id=345&order=asc&lang=fr.

You could get the browser to ignore all of these when considering cache matching like so:

http
No-Vary-Search: params=("id" "order" "lang")

Note: As a structured field, the parameters should be space-separated, quoted strings — as shown above — and not comma-separated, which developers may be more used to.

If you wanted the browser to ignore all of them and any others that might be present when cache matching, you could use the boolean form of params:

http
No-Vary-Search: params

Specifying params that do cause cache matching misses

Say the app behaved differently, with /users pointing to the main user directory landing page and /users?id=345 pointing to a completely separate detail page for a specific user. In this case you would want the browser to ignore all the parameters mentioned above for cache matching purposes, except for id, the presence of which would cause the browser to not match the /users cache entry and request /users?id=345 from the server.

This can be achieved like so:

http
No-Vary-Search: params, except=("id")

Specifications

Specification
The No-Vary-Search HTTP Caching Extension
# section-2

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
No-Vary-Search
Experimental
Chrome – Partial support
Chrome 121 – 140 (Release date: 2024-01-23)
footnote Partial support
footnote Before Chrome 127, speculation rules are only supported for navigational prefetch, not prerender.
footnote Before Chrome 141, HTTP cache is not supported.
Chrome – Full support
Chrome 141 (Release date: 2025-09-30)
footnote Full support
Edge – Partial support
Edge 121 – 140 (Release date: 2024-01-25)
footnote Partial support
footnote Before Edge 127, speculation rules are only supported for navigational prefetch, not prerender.
footnote Before Edge 141, HTTP cache is not supported.
Edge – Full support
Edge 141 (Release date: 2025-10-03)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1967294
Opera – Partial support
Opera 107 – 124 (Release date: 2024-02-07)
footnote Partial support
footnote Before Opera 113, speculation rules are only supported for navigational prefetch, not prerender.
footnote Before Opera 125, HTTP cache is not supported.
Opera – Full support
Opera 125 (Release date: 2025-12-04)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Partial support
Chrome Android 121 – 142 (Release date: 2024-01-23)
footnote Partial support
footnote Before Chrome 127, speculation rules are only supported for navigational prefetch, not prerender.
footnote Before Chrome 143, HTTP cache is not supported.
Chrome Android – Full support
Chrome Android 143 (Release date: 2025-12-02)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1967294
Opera Android – Partial support
Opera Android 81 – 93 (Release date: 2024-03-14)
footnote Partial support
footnote Before Chrome 127, speculation rules are only supported for navigational prefetch, not prerender.
footnote Before Chrome 143, HTTP cache is not supported.
Opera Android – Full support
Opera Android 94 (Release date: 2026-01-13)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Partial support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Partial support
footnote Before Chrome 127, speculation rules are only supported for navigational prefetch, not prerender.
footnote Before Chrome 143, HTTP cache is not supported.
WebView Android – Partial support
WebView Android 121 (Release date: 2024-01-23)
footnote Partial support
footnote Only enabled for navigational prefetch, not prerender, nor HTTP cache.
WebView on iOS – No support
WebView on iOS
footnote No support
HTTP cache
Experimental
Chrome – Full support
Chrome 141 (Release date: 2025-09-30)
footnote Full support
Edge – Full support
Edge 141 (Release date: 2025-10-03)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1967294
Opera – Full support
Opera 125 (Release date: 2025-12-04)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 143 (Release date: 2025-12-02)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1967294
Opera Android – Full support
Opera Android 94 (Release date: 2026-01-13)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – No support
Samsung Internet
footnote No support
WebView Android – No support
WebView Android
footnote
footnote See bug 382394774
WebView on iOS – No support
WebView on iOS
footnote No support
Speculation rules Navigational prefetch
Experimental
Chrome – Full support
Chrome 121 (Release date: 2024-01-23)
footnote Full support
Edge – Full support
Edge 121 (Release date: 2024-01-25)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1967294
Opera – Full support
Opera 107 (Release date: 2024-02-07)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 121 (Release date: 2024-01-23)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1967294
Opera Android – Full support
Opera Android 81 (Release date: 2024-03-14)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 25 (Release date: 2024-04-24)
footnote Full support
WebView Android – Full support
WebView Android 121 (Release date: 2024-01-23)
footnote Full support
WebView on iOS – No support
WebView on iOS
footnote No support
Speculation rules Prerender
Experimental
Chrome – Full support
Chrome 127 (Release date: 2024-07-23)
footnote Full support
Edge – Full support
Edge 127 (Release date: 2024-07-25)
footnote Full support
Firefox – No support
Firefox
footnote
footnote See bug 1967294
Opera – Full support
Opera 113 (Release date: 2024-08-22)
footnote Full support
Safari – No support
Safari
footnote No support
Chrome Android – Full support
Chrome Android 127 (Release date: 2024-07-23)
footnote Full support
Firefox for Android – No support
Firefox for Android
footnote
footnote See bug 1967294
Opera Android – Full support
Opera Android 84 (Release date: 2024-08-26)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
Samsung Internet – Full support
Samsung Internet 28 (Release date: 2025-04-02)
footnote Full support
WebView Android – Partial support
WebView Android 135 (Release date: 2025-04-01)
footnote Partial support
footnote Can be enabled via a Java API rather than a Web API. See https://goo.gle/android-prerender
WebView on iOS – No support
WebView on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
Partial support
Partial support
No support
No support
Experimental. Expect behavior to change in the future.
See implementation notes.
Has more compatibility info.

See also