W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2018

Variants and Client Hints

From: Jeffrey Yasskin <jyasskin@google.com>
Date: Fri, 1 Jun 2018 16:21:15 -0700
Message-ID: <CANh-dXmhN3hVKLMiz_8Tr3M_-aZejcDAD+FcTXM7+1J-9=SzBQ@mail.gmail.com>
To: HTTP Working Group <ietf-http-wg@w3.org>, Mark Nottingham <mnot@mnot.net>
Cc: Ilya Grigorik <igrigorik@google.com>
Hey Mark,

I'm working on a matching algorithm for bundled exchanges (
https://github.com/WICG/webpackage/issues/201), and I realized that a CDN's
use of variants will need a similar algorithm.
is fairly clear about how to pick a "best" Variant-Key for the Accept-*
headers, but the introduction also mentions Client Hints, where matching is
less about string equality.

For example, if the client sends Viewport-Width: 350, and the server has
images that are ideal for Viewport-Widths of 320 or 400, which one gets
sent? I can imagine a couple options:

   - Only certain kinds of clients are supported efficiently. 🤢
   - The available-values are single numbers, and the spec says that a
   request for 350 matches the next smaller number.
   - The syntax of available-values defines ranges in some way, maybe using
   a syntax like CSS Media Queries or inventing a new syntax.

What do folks think this should look like?


On Wed, May 2, 2018 at 12:14 AM <internet-drafts@ietf.org> wrote:

> A New Internet-Draft is available from the on-line Internet-Drafts
> directories.
> This draft is a work item of the Hypertext Transfer Protocol WG of the
>         Title           : HTTP Representation Variants
>         Author          : Mark Nottingham
>         Filename        : draft-ietf-httpbis-variants-01.txt
>         Pages           : 19
>         Date            : 2018-05-02
> Abstract:
>    This specification introduces an alternative way to communicate a
>    secondary cache key for a HTTP resource, using the HTTP "Variants"
>    and "Variant-Key" response header fields.  Its aim is to make HTTP
>    proactive content negotiation more cache-friendly.
> The IETF datatracker status page for this draft is:
> https://datatracker.ietf.org/doc/draft-ietf-httpbis-variants/
> There are also htmlized versions available at:
> https://tools.ietf.org/html/draft-ietf-httpbis-variants-01
> https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-variants-01
> A diff from the previous version is available at:
> https://www.ietf.org/rfcdiff?url2=draft-ietf-httpbis-variants-01
> Please note that it may take a couple of minutes from the time of
> submission
> until the htmlized version and diff are available at tools.ietf.org.
> Internet-Drafts are also available by anonymous FTP at:
> ftp://ftp.ietf.org/internet-drafts/
Received on Friday, 1 June 2018 23:21:54 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 2 February 2023 18:43:59 UTC