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

Re: My question about client hints

From: Yoav Weiss <yoav@yoav.ws>
Date: Tue, 20 Mar 2018 17:53:43 +0000
Message-ID: <CACj=BEg4ZJKFqqSG42c4A5GX=jyGYWh6GbmBVe59yhaik1GKkQ@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: "ietf-http-wg@w3.org Group" <ietf-http-wg@w3.org>, Ilya Grigorik <igrigorik@google.com>, Alex Russell <slightlyoff@google.com>
A few things that a cookie cannot cover:
* On the first page load, CH would give you hints for all the subresources
of the page, whereas a JS basde solution would be racy and is likely to
miss many of the subresources which loading started before that JS actually
ran. As Alex mentioned, all browsers have some form of a preloader, which
is likely to discover and request those resources before the cookie is set.
* Cookies cannot cover image specific `width` values, which CH can given
that this information is available in HTML.
* Cookies cannot cover 3rd party resources, which CH did support. This
support was currently removed, but would be reinstated once Feature-Policy
enables a mechanism for the 1st party to opt in to expose hints to specific
3rd parties.

On Tue, Mar 20, 2018 at 6:32 PM Eric Rescorla <ekr@rtfm.com> wrote:

> At today's session I asked the following question:
> Given that you can only send client hints if the site could run JS and set
> a cookie, then
> why can't the site just run JS on first contact, extract this data, and
> store it in a cookie,
> at which point it is available on all previous contacts.
> As far as I can tell, the only difference here is on first contact. What
> am I missing.
> -Ekr
Received on Tuesday, 20 March 2018 17:54:19 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:15:13 UTC