Cache varying on particular cookies

Jeremy Roman <jbroman@chromium.org> Wed, 21 February 2024 02:11 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
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 C4499C180B76 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 20 Feb 2024 18:11:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.857
X-Spam-Level:
X-Spam-Status: No, score=-7.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.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, 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="YFHG8vB1"; dkim=pass (2048-bit key) header.d=w3.org header.b="WyshpbH4"; dkim=pass (1024-bit key) header.d=chromium.org header.b="U9vFAuQZ"
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 aFjN_IqqgQtN for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 20 Feb 2024 18:10:59 -0800 (PST)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 3A605C151068 for <httpbisa-archive-bis2Juki@ietf.org>; Tue, 20 Feb 2024 18:10:59 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:To:Message-ID:Date:From:MIME-Version:Cc:Reply-To :In-Reply-To:References; bh=2iDqEZ/46Mt4Kfuj5H3FKk3qvFJGMATRkUBsoizSgDE=; b=Y FHG8vB1iGaCGWMMU0n0W3arSORlUdKx39rA818AttPp39jzzorcAnPh+7R2uMzGK3jkgver5kvsx0 M3+f3abV8sTlRfb0RkaK7cezt7xf7F+kOFLJ/OcAWjrWo9LE/jaYxV4S861cwRZXZg+78matYj+Ix tpKwc08qALoITAuPFXG9REG39hjJQQNcdtkI0oRvQO4/ckuFxuoa+HCY3mcLUWomgs1y/vWZwudd0 O+sWwbaU9U9Epc7uOWNRcfvJ+Dcoe5Et1TnpH/iv8FElY/yndvaVhGl9ie9UxziHs80ZEKMAa1Pl6 3752ab2RqxuyjagwFOpOf2iOQVix5DPeg==;
Received: from lists by lyra.w3.org with local (Exim 4.94.2) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1rcc2U-003ltt-3A for ietf-http-wg-dist@listhub.w3.org; Wed, 21 Feb 2024 02:08:50 +0000
Resent-Date: Wed, 21 Feb 2024 02:08:50 +0000
Resent-Message-Id: <E1rcc2U-003ltt-3A@lyra.w3.org>
Received: from pan.w3.org ([3.222.182.102]) by lyra.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <jbroman@chromium.org>) id 1rcc2R-003lsr-Jd for ietf-http-wg@listhub.w3.org; Wed, 21 Feb 2024 02:08:47 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:To:Subject:Message-ID:Date:From:MIME-Version:Cc:Reply-To :In-Reply-To:References; bh=2iDqEZ/46Mt4Kfuj5H3FKk3qvFJGMATRkUBsoizSgDE=; t=1708481327; x=1709345327; b=WyshpbH48LoiMHr3bNyU3quV7WwYw0AmfGD5U5T9v/p8icW BP7iGjZd/Yx/YSTiHvCXtnz2r1XiLGnd1Z9G+3XV8N4ppShvbjK4H8EGM5zaGWfM89XwzwBKEt6jL Kkle4KIFjvMDbn8+HvejC2UkciNDCbfpR1luYChB0zrWbJ2TjmaUQKkWGOUs0ZjHw2cwIB7QBMNR9 lTp8yvwCMyoOCaMgpYvWOZlfx7aCPS83a6mLEin+5iINoURfHX+R1JwCIOz4mH2OALD9YE0eRfEEL bExizlZKd/awhhFd79Rkbkddj3QITx6ZgpQpidslNzBatPC7JF9ml5UcXz1UifzA==;
Received-SPF: pass (pan.w3.org: domain of chromium.org designates 2a00:1450:4864:20::62e as permitted sender) client-ip=2a00:1450:4864:20::62e; envelope-from=jbroman@chromium.org; helo=mail-ej1-x62e.google.com;
Received: from mail-ej1-x62e.google.com ([2a00:1450:4864:20::62e]) 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 1rcc2Q-002PuE-2M for ietf-http-wg@w3.org; Wed, 21 Feb 2024 02:08:47 +0000
Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a293f2280c7so872361066b.1 for <ietf-http-wg@w3.org>; Tue, 20 Feb 2024 18:08:46 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1708481322; x=1709086122; darn=w3.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=2iDqEZ/46Mt4Kfuj5H3FKk3qvFJGMATRkUBsoizSgDE=; b=U9vFAuQZLZEeBYhn4kdDGqXioHvEQ09zPwvkSbMz9lPjpKBFkAoCAeiAXz7TCG1JCy 1gIrgjtOrS5XkyFYExRzTfJwziA/HQbPNn30YRx4hC3qDqwcGYEkzxrzVx/TsNbJgyO4 LVREVHUiqzV+CAN/Qc6fhbOtjBkIB9sRomf7c=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708481322; x=1709086122; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2iDqEZ/46Mt4Kfuj5H3FKk3qvFJGMATRkUBsoizSgDE=; b=fqutwibCE0kEt3nlOmZQ57Z0L4cHdrgDVjnoW8/PP/4IHX40CAoGoetXAEU6BhCuq5 xsleTBnu9TFy0tx77mgrzhlfD+LxVo6MOe6IqZBo34s5/7CnYJKs8G5r3AD3q7ys9BKu jT3RL4LZMkjK3tf23Frj6z1iOqslML49V1sbNJYAVZ8gmH6NYZh0hhwyB8vSvm9BQS67 CM+MGEYrGODQhN+B806BiMKwza8yfXuq+u0KEKbvQ7ve4FQledxrUeRNUNfT/mSdPqKY vmfpfVD1KrckZwvTyRErGtpyirRZ8zV8oH+C9r9PbOiBbbiSjVFBbFU82349oFzbxBku EoAQ==
X-Gm-Message-State: AOJu0Yw0yX2W2nYJNHl4QCl1WNiA7Ugn/6yS7TxdXn5eeCvdn6g83BUf SVR6A8id1ReGQcOLkmAfzqKVuI/pw3cWO7xBIrbvT6bNeU+0JCNyHgJyxSpDsOLnub2MsILEoaH Foz2XKgTp9WPHbDCgeyvndJz/zSymgJduZWhgS+QLk8eDqo2sAw==
X-Google-Smtp-Source: AGHT+IFYm9l8xeWxrqE5np5+p8srXllfKLvs20y68xHQO9IjTDuzdlcEfY4mgLOlOV0iVNTUZ/ilXYH3WgX7YZ/KrRM=
X-Received: by 2002:a17:906:1d55:b0:a3d:d1da:1247 with SMTP id o21-20020a1709061d5500b00a3dd1da1247mr9062811ejh.56.1708481322436; Tue, 20 Feb 2024 18:08:42 -0800 (PST)
MIME-Version: 1.0
From: Jeremy Roman <jbroman@chromium.org>
Date: Tue, 20 Feb 2024 21:08:30 -0500
Message-ID: <CACuR13fgnfN3ENOQxFWaJH0YiG1GoM4T722D6MHNjNWfKD8WEg@mail.gmail.com>
To: ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="0000000000005456f60611dace2a"
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.2
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.05, 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_DBL_BLOCKED_OPENDNS=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: pan.w3.org 1rcc2Q-002PuE-2M 24f7403de2ee13ac6c66c3261587f0a8
X-Original-To: ietf-http-wg@w3.org
Subject: Cache varying on particular cookies
Archived-At: <https://www.w3.org/mid/CACuR13fgnfN3ENOQxFWaJH0YiG1GoM4T722D6MHNjNWfKD8WEg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51810
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>

Hello HTTPWG:

I'm working on speculative loading in Google Chrome (most saliently,
prefetch of documents for navigation) and looking at ways to address the
potential problem of prefetched resources becoming "stale" by the time they
are used due to the user logging in or out (or similar state changes), in
response to developer feedback. Workarounds are possible but somewhat
awkward <https://calendar.perfplanet.com/2023/rli/>.

Fundamentally it seems like something less strict than "Vary: Cookie" is
called for, which would let the client know which cookie values, if
changed, invalidate the cached resource. The semantics of this seem
potentially useful for other kinds of cache (e.g., some caching proxies can
be configured to work this way), so HTTP WG seems like potentially the
right venue to discuss this.

Mark Nottingham's Cookie-Indices proposal
<https://mnot.github.io/I-D/draft-nottingham-http-availability-hints.html#name-cookie>
(part
of HTTP Availability Hints) seems likely to address the problem and ought
to be implementable (I'm prototyping it in Chromium's prefetch cache, at
least), so that's what I'm looking at right now, but at this moment we're
not yet committed to a particular solution.

What do you all think?