Skip to content
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

No-Vary-Search #106

Open
liviutinta opened this issue Dec 8, 2022 · 3 comments
Open

No-Vary-Search #106

liviutinta opened this issue Dec 8, 2022 · 3 comments
Assignees
Labels
from: Google Proposed, edited, or co-edited by Google. topic: http Spec relates to the HTTP (Hypertext Transfer Protocol) family of protocols topic: networking venue: IETF HTTP WG venue: WHATWG Fetch Workstream venue: WICG Proposal is incubated in the Web Incubator Community Group

Comments

@liviutinta
Copy link

liviutinta commented Dec 8, 2022

Request for position on an emerging web specification

  • WebKittens who can provide input: @annevk

Information about the spec

Design reviews and vendor positions

Anything else we need to know

No-Vary-Search is a proposed HTTP header which changes how various URL-keyed caches match, by letting them ignore some or all query parameters, or query parameter order. For example, if the order of the query parameter keys should not cause cache misses, this is indicated using

No-Vary-Search: key-order

If the specific query parameters (e.g., ones indicating something for analytics) should not cause cache misses, this is indicated using

No-Vary-Search: params=("utm_source" "utm_medium" "utm_campaign")

And if the page instead wants to take an allowlist-based approach, where only certain known query parameters should cause cache misses, they can use

No-Vary-Search: params, except=("productId")
@annevk
Copy link
Contributor

annevk commented Dec 9, 2022

One thing that came up when discussing this with the HTTP community is that browsers currently ignore Vary in a bunch of caches and also have a poor implementation of it in the HTTP cache. As we go beyond Vary I think it makes sense to revisit that a bit to see how much of those Vary cases are bugs versus principled decisions.

@annevk annevk added topic: networking topic: http Spec relates to the HTTP (Hypertext Transfer Protocol) family of protocols venue: IETF HTTP WG venue: WICG Proposal is incubated in the Web Incubator Community Group venue: WHATWG Fetch Workstream from: Google Proposed, edited, or co-edited by Google. labels Dec 9, 2022
@domenic
Copy link

domenic commented Dec 12, 2022

Yeah we have some early thoughts on that for preloads in WICG/nav-speculation#170 . The tentative conclusion is that we should probably respect Vary: referer, but there isn't a strong use case for much else.

For other web platform caches, I could see how maybe people might get interesting behaviors with Vary: Sec-Fetch-Dest or similar. (But probably aren't doing that today, so, not sure how important it would be to support that...)

@hober hober moved this from Unscreened to Needs position in Standards Positions Review Backlog Mar 23, 2023
@hober hober moved this from Needs position to Needs assignees in Standards Positions Review Backlog Mar 27, 2023
@hober hober moved this from Needs assignees to Needs position in Standards Positions Review Backlog Mar 27, 2023
@hober hober changed the title Request for Position: No-Vary-Search No-Vary-Search Mar 30, 2023
@liviutinta
Copy link
Author

An update: No-Vary-Search header support for navigational prefetch shipped in Chrome 121, and will ship for prerender in Chrome 127.

Chrome status entries:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from: Google Proposed, edited, or co-edited by Google. topic: http Spec relates to the HTTP (Hypertext Transfer Protocol) family of protocols topic: networking venue: IETF HTTP WG venue: WHATWG Fetch Workstream venue: WICG Proposal is incubated in the Web Incubator Community Group
Projects
Development

No branches or pull requests

4 participants