Re: No-Vary-Search

Jeremy Roman <jbroman@chromium.org> Tue, 18 June 2024 21:32 UTC

Received: by ietfa.amsl.com (Postfix) id 75B69C180B49; Tue, 18 Jun 2024 14:32:45 -0700 (PDT)
Delivered-To: ietfarch-httpbisa-archive-bis2juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 74FD6C17C8A2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 18 Jun 2024 14:32:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.857
X-Spam-Level:
X-Spam-Status: No, score=-2.857 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=w3.org header.b="S2ggAfe9"; dkim=pass (2048-bit key) header.d=w3.org header.b="QBpNeWvq"; dkim=pass (1024-bit key) header.d=chromium.org header.b="DJZPGZRm"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SyKDXddg0d05 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 18 Jun 2024 14:32:41 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E8F83C14CF1F for <httpbisa-archive-bis2Juki@ietf.org>; Tue, 18 Jun 2024 14:32:40 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:Cc:To:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=vmUw9JzjYKpJvD/G2BCbVjW0RLFE6XS0QylnzsYMJ20=; b=S2ggAfe9/QUS3wRgvnmcH8teAp V4P2T1C0fH8inmozGToK2Xuz9gBB67T+HeKGRHPZt4Xqrd79N8SPJBogX2P3Cc1iluNk7Erd+HBUk hBCHnwpn9/jzrNeBTnfeuHHd8k5dWt09iyMDTenPjtVvnbIeYOlo82fbir812ScKNtN6Nqc+3N5Fm MvT3/OQleO7txxXwBvpCM82jGycebooTa1VPGFoMDcJnL9wvoK1WN/+4SjrZoPYxYWwxd7EuqtNZU nW2NQHxAUpuGqSPwjzkVDwupPwvGU1m/c7j672md1EMvbVzUOokiXTqDAvyki61JtvIxdUGewMhah lzQt+e8w==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1sJgQf-00GgKA-1I for ietf-http-wg-dist@listhub.w3.org; Tue, 18 Jun 2024 21:31:49 +0000
Resent-Date: Tue, 18 Jun 2024 21:31:49 +0000
Resent-Message-Id: <E1sJgQf-00GgKA-1I@mab.w3.org>
Received: from ip-10-0-0-144.ec2.internal ([10.0.0.144] helo=pan.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <jbroman@chromium.org>) id 1sJgQd-00GgJB-21 for ietf-http-wg@listhub.w3.internal; Tue, 18 Jun 2024 21:31:47 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To; bh=vmUw9JzjYKpJvD/G2BCbVjW0RLFE6XS0QylnzsYMJ20=; t=1718746307; x=1719610307; b=QBpNeWvqBd72WBfFMZZeGAi9F+Rk8G4b4ZnDkK43cYcT1JwCMEpuwQxVVfXEK+li8pRcAznLnJT QRhe6TTCqNL377bLfCn09wdBkG3ZO7vAO8KlUI7WVgFa8FkEwBmkgSTZ+c4Ymvya+6ZieOIFNjw+Y eepqgD/2RTu4m3qGU0bHHPyv/maIim7Zv5rNsg736mP6XfHsbVvjvO4OvKBNL2gUiL4iO2Aj/C5k1 NrXGHCMvhkJWZySqN2sWSOyOiPz3SvMjHVaWr+hSmoCLFoBbyHyE61aC7F+vmwEtM5KPT39WH+bkh H6rYGwmWlMlrDLoXGRcQBqOZbHREWT5NQqiA==;
Received-SPF: pass (pan.w3.org: domain of chromium.org designates 2a00:1450:4864:20::633 as permitted sender) client-ip=2a00:1450:4864:20::633; envelope-from=jbroman@chromium.org; helo=mail-ej1-x633.google.com;
Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by pan.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <jbroman@chromium.org>) id 1sJgQc-00Gb5o-2f for ietf-http-wg@w3.org; Tue, 18 Jun 2024 21:31:47 +0000
Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a6e349c0f2bso770406366b.2 for <ietf-http-wg@w3.org>; Tue, 18 Jun 2024 14:31:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1718746303; x=1719351103; darn=w3.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vmUw9JzjYKpJvD/G2BCbVjW0RLFE6XS0QylnzsYMJ20=; b=DJZPGZRmCfSXDtdV5AZJCU9NV2yRlCQISiIF0NgeeRxISoh/C9LVQnkVavbncUPsU3 rS2KfEZywWCgKTBN4z9/eK12PVugfM8dHgic1DQpl7SeSFyeA7lv0c6enM47Qj9ORPk7 ayv6hO0RC2kn16lP7Ls0pext9PQm+2VOM6y5Q=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718746303; x=1719351103; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vmUw9JzjYKpJvD/G2BCbVjW0RLFE6XS0QylnzsYMJ20=; b=Y7dFSmAPX1Zap0/xOBjeKhAiSwCbIPX2Joq1yLe9KMZcF5HGlI4dNgEtrbp4VQHLHL kpxpwdq9rCBLY/CwoJLyiv+UdvufbSrqI41DhKnsd6LdTETWznv3CWamTNOKkHPGsAyg npAJYXMeMWn3T9f8vO9GoB22VoxgObIjzElNWjdhUJq7R8kC5GnrcKYma1xvPjyr4EgK fgo8a39AG4nLx0KzESoknkguu2twNdz3AnuRX0Le3p87VOtQOmFOpEboI4PCUp96jgje NCvogfzo2T3BUQerdDuwecT0Q4Vp9hfkwDZiMv7LYwN8NeUeOZeOgCeUSYEf8XIH+WyD +Scg==
X-Gm-Message-State: AOJu0YxEwaM4T4EJX4RvmlcZAjF22bS8dMk6ZLX8lxfNcVc16sZFAuqV /NAiN13Kln8yNkH3C9aJJUblV7tO1shJwTgVRomrqJ5mOJJNUzivD5iEY537iIs6T3WvNliZnYU PAfgO/Z3thOYXzn+TE4kQM8saJytGUdFHX8rj
X-Google-Smtp-Source: AGHT+IFKVH/oMtkM0ozWb15h+GpbWKTA8kahviE0fB/ORDT8Kyhzsmdl5rCE2C9rThf6KuZGrrF05jofNqn+OnLhSU4=
X-Received: by 2002:a17:907:8e8d:b0:a6f:173d:36b9 with SMTP id a640c23a62f3a-a6fab60b8e8mr45400766b.16.1718746302468; Tue, 18 Jun 2024 14:31:42 -0700 (PDT)
MIME-Version: 1.0
References: <CACuR13cnHHoRv_Z-HtJeOyJqZb7AVU-_udQ=R_x9qQ1_JeP=KQ@mail.gmail.com> <CAEmMwDwZ8RB0Zz5GCbPeSFH-1tVgTW-hy4_0Fd1L90hNi3h0RA@mail.gmail.com> <CAEmMwDwxpy7QvJBx01WZpHmH=c2QKE6Q7iBAQisNSqRaxBoz3Q@mail.gmail.com>
In-Reply-To: <CAEmMwDwxpy7QvJBx01WZpHmH=c2QKE6Q7iBAQisNSqRaxBoz3Q@mail.gmail.com>
From: Jeremy Roman <jbroman@chromium.org>
Date: Tue, 18 Jun 2024 17:31:29 -0400
Message-ID: <CACuR13fENsddR_-3NK+w8w5OvcOwnyt=_eiHsK0E0S2X4rr=ZQ@mail.gmail.com>
To: Rory Hewitt <rory.hewitt@gmail.com>
Cc: ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="000000000000d16787061b30ce6f"
X-W3C-Hub-DKIM-Status: validation passed: (address=jbroman@chromium.org domain=chromium.org), signature is good
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.148, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, DMARC_PASS=-0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1sJgQc-00Gb5o-2f eb5468aa7b3ec7622ebfc0d131626044
X-Original-To: ietf-http-wg@w3.org
Subject: Re: No-Vary-Search
Archived-At: <https://www.w3.org/mid/CACuR13fENsddR_-3NK+w8w5OvcOwnyt=_eiHsK0E0S2X4rr=ZQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/52026
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <https://www.w3.org/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Tue, Jun 18, 2024 at 4:42 PM Rory Hewitt <rory.hewitt@gmail.com> wrote:

> Hi Jeremy,
>
> In the two examples sections, can you provide an example of a URL and show
> how specifying this header will change caching - your examples give some
> "Input => Result" answers in a table, but I think an actual sample URL
> (e.g. https://www.example.com?you=cool&me=notcool) showing the effect of
> various header values affect how the content should be cached would be
> useful.
>

Very reasonable to point out that examples that better explain this could
be added. To give some inline here for now:

*Cases where the server ignores order, but the client pages may not
consistently order keys.*
No-Vary-Search: key-order
https://example.com/products?color=red&size=medium
https://example.com/products?size=medium&color=red

*Cases where a server has parameters which affect processing but not the
response (at least, semantically). For example, it might prioritize the
request, route it to different backend instances, or mark it with a label
for debugging.*
No-Vary-Search: params=("processing_priority")
https://example.com/search?q=vancouver&processing_priority=userblocking
https://example.com/search?q=vancouver&processing_priority=background

*Cases where there are parameters which are only processed by client-side
script (e.g., to initialize client state)*
No-Vary-Search: params=("zoom")
https://example.com/map?q=vancouver&zoom=5
https://example.com/map?q=vancouver&zoom=9

*Cases where there are parameters which are not yet known when loading
(esp. preloading) happens, but which can be processed client-side*
No-Vary-Search: params=("via")
https://example.com/search?q=vancouver&via=homepage_banner
https://example.com/search?q=vancouver&via=destinations_sidebar

On Tue, Jun 18, 2024 at 1:20 PM Rory Hewitt <rory.hewitt@gmail.com> wrote:
>
>> Hey Jeremy,
>>
>> > This was originally No-Vary-Query, but the web-exposed APIs call this
>> part of the URL "search", so this change was requested in a W3C discussion.
>>
>> I can understand why you changed the name from "No-Vary-Query", but given
>> that it's primarily a mechanism to change the way that content is cached, I
>> think it makes sense to call it "No-Vary-Cache"
>>
>> I think this document needs a high-level overview section, explaining
>> what you're trying to do and what specific problems you're trying to solve.
>> You're clearly deep in the weeds on it (I don't mean that pejoratively!)
>> but for those of us that are coming at it fresh, it needs something there
>> to tell us about the idea/project.
>>
>
I'll avoid getting too deep into bikeshed painting, but briefly: I hoped to
evoke the longstanding Vary header
<https://www.rfc-editor.org/rfc/rfc9110#field.vary>.


> On Tue, Feb 20, 2024 at 6:14 PM Jeremy Roman <jbroman@chromium.org> wrote:
>>
>>> Hello HTTPWG:
>>>
>>> This is tangentially unrelated to my previous email, but I've split it
>>> into another thread to avoid entangling the two.
>>>
>>> A developer previously reported to us that their ability to use the
>>> prefetch cache was limited because their prefetch request URLs needed to
>>> include certain query parameters which are different from the navigation
>>> request URL, even though these URLs do not affect the resource the server
>>> ultimately produces (and therefore, the client can safely use the
>>> resource). The explainer
>>> <https://github.com/WICG/nav-speculation/blob/main/no-vary-search.md> we
>>> wrote goes through some of the possible use cases in more detail.
>>>
>>> The semantics we have right now (and the header name, No-Vary-Search¹)
>>> are designed with the concept of being implementable in non-browser HTTP
>>> implementations, but since browser use cases were what we are focused on,
>>> there are some places where the semantics rely on, e.g., WHATWG URL
>>> <https://url.spec.whatwg.org/>, which may vary in subtle ways from
>>> other concepts of the meaning of the query string (since IETF HTTP doesn't
>>> currently take a position on that as far as I know).
>>>
>>> The specification draft
>>> <https://wicg.github.io/nav-speculation/no-vary-search.html> is
>>> currently hosted by the W3C's Web Incubator Community Group (WICG) and
>>> we've previously discussed it in a W3C context, but it was suggested that
>>> we bring it to HTTPWG's attention, too, and if there is interest among
>>> participants it could migrate to an HTTPWG RFC instead of continuing
>>> incubation in the web standards venues.
>>>
>>> ¹ This was originally No-Vary-Query, but the web-exposed APIs call this
>>> part of the URL "search", so this change was requested in a W3C discussion.
>>>
>>