Re: Variants and Client Hints

Mark Nottingham <mnot@mnot.net> Wed, 13 June 2018 05:30 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 9DF1F130DE5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Jun 2018 22:30:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.752
X-Spam-Level:
X-Spam-Status: No, score=-7.752 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=IjxxtLR3; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=dYt0SnsW
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id p5gCtlUV7YOi for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 12 Jun 2018 22:30:52 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9E6F6126F72 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 12 Jun 2018 22:30:52 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1fSyKP-0005Rj-7x for ietf-http-wg-dist@listhub.w3.org; Wed, 13 Jun 2018 05:28:17 +0000
Resent-Date: Wed, 13 Jun 2018 05:28:17 +0000
Resent-Message-Id: <E1fSyKP-0005Rj-7x@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mnot@mnot.net>) id 1fSyKL-0005R7-Ne for ietf-http-wg@listhub.w3.org; Wed, 13 Jun 2018 05:28:13 +0000
Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mnot@mnot.net>) id 1fSyKI-000737-Hr for ietf-http-wg@w3.org; Wed, 13 Jun 2018 05:28:13 +0000
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C51DA21A78; Wed, 13 Jun 2018 01:27:49 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 13 Jun 2018 01:27:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=0BafZMv2EQbEj1m5a5+y2rRVZZvk9 VL2RybxnoVjoy8=; b=IjxxtLR37cAx26vHG6sbDLn7aqUW/Lsy/L2lGKtG5VJEx O4vtfwDsLl/mi7DHtFGKk3XHqOlr1gH2ycsyRL6TKq1XppLnsVlFkSX8BhO1xyGL VkjPIDAT9SW1C+cb3FeFOAo83vaRR3ux6ul7bfbZmyOOiO66GfIia9MmBMLvi7xY x/Me/YSalBSzshGQuL/zqaG4Fvl6KNz8iDtoD51y9IGBIaGhck8bX14gSmtEG3l5 6jQpAEuVnu0P8F9NzqLYuqp28ROrxUPrSz9IeQ2R8BmqfgynVCj6CIietmSRoist D4WenTQoozI6OpNURZlRLg/rY3ROOTCL7gw/aBhsg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=0BafZM v2EQbEj1m5a5+y2rRVZZvk9VL2RybxnoVjoy8=; b=dYt0SnsW46OueY1YYa3hls CcYmzgAXEZ98N7tox5Guje/rLY25+rgoxGxv0Z5SUeMwF7lVQQMGSWSvABSgAz1Y SFcQ1BiVx072xYaYQfQumM1hoCgZLfVSuEFBXE1NvkT5/HKaq3fM3BTr3IHny8uv TgcBgOZ4zHKKMty8XRgF7ZPm1FVRZPrkqtlj0d4CID1B5sMGx2l/Ce5YLenoFXvz Hr6FWjw9sR+l+v33FV3jJVV0zAKdw68glXvIGF71c9YBVeYiVIVZe88HZQtCiUl0 XhSmueE5CkVtjjOwHMN/vd6QtGNDgCrS6+Il8yBGJ/Xpw3ttsfabWNEVG445tPNA ==
X-ME-Proxy: <xmx:VasgW-PnLVcC8-tuJtWkgZdEVG7LSK3gSHOjq7H69y-chsPfhgAeTQ>
X-ME-Proxy: <xmx:VasgW4GeDHN-tqReeInr-qu0lOaoMrrkjvA7Ys3DI05uSpGmgzQXiA>
X-ME-Proxy: <xmx:VasgW_mSJydUEiWyIit8VB8Ba8Dw6tsBSqcNaCdrwYni_jsh7rD94Q>
X-ME-Proxy: <xmx:VasgW7RBOkT-QihG5F74yq3J_ZxJ6aTtfh9CHHk4TjL6J5B7IQPHHg>
X-ME-Proxy: <xmx:VasgW7TbWpvIT6Iy1Pz9ugZrJQq4hD3rvuu80nIjTK6vHKpqLy9ilw>
X-ME-Proxy: <xmx:VasgW0OmsZUF3PJamI4VSyRjjGmrlPZ4_XJLqf9NgOMa-s3wtUOFOg>
X-ME-Sender: <xms:VasgWw2ItDgoQdmsb0Dxwjz-T7MveUck8qktN_m3HfriUk1Q3_ezvA>
Received: from macbook-pro.localdomain (unknown [144.136.175.28]) by mail.messagingengine.com (Postfix) with ESMTPA id CA05B102BC; Wed, 13 Jun 2018 01:27:47 -0400 (EDT)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <CACj=BEj516WyXgPpqpEE_rRpq12noDyNwU-be8sr4zq+x9LkFw@mail.gmail.com>
Date: Wed, 13 Jun 2018 15:27:44 +1000
Cc: Ilya Grigorik <igrigorik@google.com>, Jeffrey Yasskin <jyasskin@google.com>, HTTP working group mailing list <ietf-http-wg@w3.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <11840CF2-22BC-482F-81FA-729DAFAE3E3E@mnot.net>
References: <152524471147.10888.15768344253988846813@ietfa.amsl.com> <CANh-dXmhN3hVKLMiz_8Tr3M_-aZejcDAD+FcTXM7+1J-9=SzBQ@mail.gmail.com> <2DA552F8-076A-486E-8C52-26DEEA658731@mnot.net> <CADXXVKrFBeLJW=Mh70S1bzQct-X440Km_kkacefKE=PwpCsYhg@mail.gmail.com> <2F6C1117-648A-4DBA-BA2C-DB4A9356C7C8@mnot.net> <CACj=BEgtNcKs8LHAkK+Pnh0JeGZk0-0AmM8w4cziJVzXM25Ddw@mail.gmail.com> <847B7CC5-BB40-4C8B-BBB4-7C90FA93485C@mnot.net> <CACj=BEj516WyXgPpqpEE_rRpq12noDyNwU-be8sr4zq+x9LkFw@mail.gmail.com>
To: Yoav Weiss <yoav@yoav.ws>
X-Mailer: Apple Mail (2.3445.8.2)
X-W3C-Hub-Spam-Status: No, score=-6.6
X-W3C-Hub-Spam-Report: AWL=3.091, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1fSyKI-000737-Hr d3f4e582d85c2644233376e01da4f6f7
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Variants and Client Hints
Archived-At: <https://www.w3.org/mid/11840CF2-22BC-482F-81FA-729DAFAE3E3E@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/35540
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/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>


> On 8 Jun 2018, at 11:33 am, Yoav Weiss <yoav@yoav.ws> wrote:
> 
> On Fri, Jun 8, 2018 at 11:12 AM Mark Nottingham <mnot@mnot.net> wrote:
>> Hi Yoav,
>> 
>> On 8 Jun 2018, at 10:55 am, Yoav Weiss <yoav@yoav.ws> wrote:
>> 
>> For example, let's say that we say the rule here is "next smallest." A server that prefers quality can take that into account and up the quality of their images, relative to the sizes they make available. If they want to go back to the origin, they won't use Variants; they'll fall back to Vary.
> 
> High quality but upscaled images will end up upsetting everyone (as they'd end up blurry and bloated).
> 
> The inverse (i.e. a "next largest" algorithm) might be a better choice, but I suspect it won't satisfy some people's use cases.

Hm. A little more?

>> I don't think adding more complexity to the protocol is justified here; people can meet their use cases (at least as far as you outline above) with just one algorithm.
> 
> I'm not sure I see how. Could you outline an example?

See below.

>> My thinking to date has been that extra information of this sort could be encoded in the available-value if necessary -- but it'd be nice to have a worked example. Note that the syntax of available-value opened up in the latest draft; if more characters would help, we can figure that out.
> 
> Are you suggesting that origins will communicate in the available-value e.g. the ranges of viewports that an image can satisfy? That may work if we ignore the potential cross-conneg-mechanism interactions. 

That's one possibility, At the end of the day, available-value is just a string under control of the spec, and the algorithm can do pretty much anything as long as it produces appropriate outputs (although if it relies on inputs not listed, it's going to raise the bar for implementation). The tricky bit is likely to be making it succinct. 


>> That said, the syntax of Variant-Key now allows a response to match multiple keys, which at least helps in the duplication issue; see the last part of:
>>   https://httpwg.org/http-extensions/draft-ietf-httpbis-variants.html#variant-key
> 
> I agree that's better, but still, the response for `DPR: 2, Viewport: 300`, `DPR:1, Viewport: 600` and `DPR: 2, Viewport: 600, Save-Data: on` could be one and the same. Avoiding that cache duplication can be an important factor.

Right, but that response would have on it something like:

Variants: DPR;1;2, Viewport;600;1200, Save-Data;on;off
Variant-Key: 1;2, 600, on;off

If that's not expressive enough, maybe we should be talking about a Variant-Key syntax that lets you specify alternative sets of values, e.g.,

Variants: DPR;1;2, Viewport;300;600, Save-Data;on;off
Variant-Key: 2;300;off, 1;600;off, 2;600;on


--
Mark Nottingham   https://www.mnot.net/