Re: My question about client hints

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