standards-positions icon indicating copy to clipboard operation
standards-positions copied to clipboard

User Preference Media Features Client Hints Headers

Open tomayac opened this issue 3 years ago • 6 comments
trafficstars

Request for position on an emerging web specification

  • WebKittens who can provide input: ?

Information about the spec

  • Spec Title: User Preference Media Features Client Hints Headers
  • Spec URL: https://wicg.github.io/user-preference-media-features-headers/
  • GitHub repository: https://github.com/wicg/user-preference-media-features-headers/

Design reviews and vendor positions

  • TAG Design Review: https://github.com/w3ctag/design-reviews/issues/632
  • Mozilla standards-positions issue: https://github.com/mozilla/standards-positions/issues/526

Bugs tracking this feature

  • WebKit Bugzilla: https://bugs.webkit.org/show_bug.cgi?id=242102
  • Radar: <rdar://problem/96504765>
  • Mozilla Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1777192
  • Chromium: ~~https://crbug.com/1207897~~ (Verified [Closed])

Anything else we need to know

This has been implemented by Google Search.

tomayac avatar Jun 29 '22 09:06 tomayac

cc @johnwilander @cookiecrook

hober avatar Jun 30 '22 21:06 hober

See also #20 for the underlying Client Hints infra.

gsnedders avatar Jun 30 '22 21:06 gsnedders

Off-hand, this essentially just allows sites to avoid saving cookies with data from Window.matchMedia, right? As such, from a fingerprinting point-of-view (and with CHs subject to the same story policies) this doesn't provide any additional surface?

(Note I'm not considering Client Hint Reliability here, despite that being informatively (I think?) referenced in this spec; that would be another standard to have a position on!)

gsnedders avatar Jun 30 '22 22:06 gsnedders

This potentially turns active fingerprinting surface into passive fingerprinting surface, which would be concerning, given the sensitivity of some of these properties.

othermaciej avatar Jul 01 '22 07:07 othermaciej

With Sec-CH-Prefers-Color-Scheme marked as critical client hint, it can make a huge difference in user experience since it would avoid a flash of white (a common complaint), so the server can tailor the response also for the very first time before a user visits a site:

HTTP/1.1 200 OK
Content-Type: text/html
Accept-CH: Sec-CH-Prefers-Color-Scheme, Sec-CH-Prefers-Contrast
Vary: Sec-CH-Prefers-Color-Scheme
Critical-CH: Sec-CH-Prefers-Color-Scheme

tomayac avatar Jul 01 '22 09:07 tomayac

FWIW, client hints in general are active fingerprinting surface, not passive, because the server has to actively turn them on by sending the Accept-CH header. There are a few rare exceptions in the UA CH spec, but this one isn't an exception.

jyasskin avatar Sep 10 '22 15:09 jyasskin

With Sec-CH-Prefers-Color-Scheme marked as critical client hint, it can make a huge difference in user experience since it would avoid a flash of white (a common complaint), so the server can tailor the response also for the very first time before a user visits a site

Since the browser already knows the user prefers a dark color scheme, fixing this nit could be an implementation detail, couldn't it? I also believe there are ways the site author could already address the white FOUC.

cookiecrook avatar Mar 03 '23 06:03 cookiecrook

We need to come to a position on https://github.com/WebKit/standards-positions/issues/20 before we can come to positions on proposals that use the Client Hints infrastructure.

hober avatar Mar 29 '23 17:03 hober

As a heads up I'm currently prototyping adding a new user preference client hint Sec-CH-Prefers-Reduced-Transparency this as you can probably guess will reflect the prefers-reduced-transparency media feature (See #145 ).

lukewarlow avatar Jul 25 '23 19:07 lukewarlow

As a heads up I'm currently prototyping adding a new user preference client hint Sec-CH-Prefers-Reduced-Transparency this as you can probably guess will reflect the prefers-reduced-motion media feature (See #145 ).

(I suppose you mean "will reflect prefers-reduced-transparency" based on #145.)

FYI, I have an open PR about adding Privacy Considerations. See https://github.com/WICG/user-preference-media-features-headers/pull/11 for details.

tomayac avatar Jul 26 '23 11:07 tomayac