Closed nielsbasjes closed 1 year ago
Note that it may seem to add a lot of entropy but I think it doesn't because just about all phones will have the same list here and from the other headers it is already known to be a phone. Same for all Tablets, all game consoles, etc.
This logic is backwards - if most people have similar values and then a small group have very different values, then this makes it far easier to identify that small group.
I think this should be present on the first request. Which makes it something that should be allowed into the
low entropy
group
Given the high-entropy nature of this proposal (i.e., there's a lot of info here that can't be passively derived), I don't think we would send it by default. And +1 to what @Sora2455 is saying.
As to "Output capabilities/ScreenType/Size indicator" - this is basically the original proposal of the form-factor hint. Should we really be sending more info/bytes over the wire than this (interaction/attn) for use cases that aren't interested in it (e.g., analytics)?
I like that this is getting down to the "facts" about the UA/device, rather than interpretations or industry trends. And, I think the three dimensions outlined here are good: Output, Interaction, and Attention.
I'd like to get more feedback from other sites that might want to use this value. While that's in progress, a few comments of my own:
Sec-CH-UA-Form-Factor
or in some other header(s).Critical-CH
header to get that (at a small penalty of re-starting that connection). But the information certainly doesn't need to be sent automatically with every request the browser makes.Note that it may seem to add a lot of entropy but I think it doesn't because just about all phones will have the same list here and from the other headers it is already known to be a phone. Same for all Tablets, all game consoles, etc.
This logic is backwards - if most people have similar values and then a small group have very different values, then this makes it far easier to identify that small group.
Ah yes, I see your point.
Looking forward to the feedback you get @djmitche. With my editor hat on, my preference is to keep it simple and informed by use cases, and possibly add additional info in the future.
Classifying the use-cases I've uncovered so far:
The analytics cases are wanting to cover the universe of user agents contacting a site. The variants and wrappers cases are user agents wanting a way to say "this is new and different in a way that is significant to at least one site and probably others".
To the three dimensions:
To Mike's point about simplicity, it seems reasonable to drop the Output and Attention dimensions, leaving only a single dimension. The spec language should probably describe what that represents as a way of constraining what new values are added.
That leaves:
I have some opinions on those but would be interested to hear reactions to this summary before voicing them.
Perhaps I'm looking for feedback too early (in an issue, before making a PR to a draft spec!). Here are my opinions, which I will formulate into the existing PR, #343.
Sec-CH-UA-Form-Factor
is a good (enough) name.sf-list
, ordered lexically. Sites should test this list for the presence of values of interest, without regard to the order of the list. Ordering the values lexically prevents distinguishing two user-agents by otherwise-meaningless differences in order. I don't think ranked values helps in any of the identified use-cases.@arichiv gave a nice illustration of how allowing values to encompass others, and representing a set of values, supports future expansion.
LGTM as a plan @djmitche
Fixed in #343, but I can't close this issue.
As proposed here by @djmitche (CC: @miketaylr) a new issue to discuss my ideas for a possible future proof way for the
Sec-CH-UA-Form-Factor
header.My overall proposal is to make the
Sec-CH-UA-Form-Factor
header a clear future proof indicator on the kind of content and interaction is suitable for the device/client the user is using at the moment. So in addition to indicating the things we see today it should also be extensible into future developments (like contactlens screens, brain interaction, ...).From the browser perspective this header is its indicator to tell the website what is the
best content
it can consume. I think this should be present on the first request. Which makes it something that should be allowed into thelow entropy
group and cannot contain any detail about the device.So in the below proposal for this header is where I'm trying to stay at
useful detail
without going intofingerprinting detail
(which is a tricky balance).Note that this also makes the
Sec-CH-UA-Mobile
effectively an extreme simplification of this header (perhaps in time even obsolete).Essentially a site needs to know from the device:
More extensively the kinds of values I have in mind:
The Output capabilities/ScreenType/Size indicator
None
: No screen, Headless, Server-to-Server, etc.Watch
: A (usually handheld, usually touch) screen < 2"Phone
: A (usually handheld, usually touch) screen between 2" and 7"Tablet
: A (usually handheld, usually touch) screen between 7" and 14"Desktop
: A (usually movable but not handheld, usually no touch) screen between 15" and 30"TV
: A fixed (usually wall mounted, no touch) large screen > 32"VR
: A VR Headset that CANNOT mix the images from the outside world in view. So only suitable for VR contentXR
: A VR Headset that CAN mix the images from the outside world in view. So suitable for all VR/AR/MR content which is commonly calledXR
.eInk
: A slow tablet sized display that only has 2 colors/greyscale and does not support fast changes like animations, movies and games.NOTE: The above list needs discussion as it still mixes screen size and content capabilities.
The Interaction capabilities indicator (multi valued)
None
: No screen, Headless, Server-to-Server ... so no human interactions.Keyboard
: A keyboard interactionMouse
: A mouse interactionTouch
: A touch screenGame
: A gamepad type controller (mini joysticks) as used on Playstation, Xbox, Nintendo switch, etc. suitable for fast interactions.Remote
: A controller with only arrow keys, Ok and Cancel buttons: as used with many TVs and Set top boxes (like the "Google Chromecast with Google TV" and "Apple TV"). Only suitable for slow interactions.Gesture
: A device that looks at gestures and motion of the user.Voice
: A voice controlled device.Camera
: It has a cameraOrientation
: It has an orientation sensorLocation
: It has location information (GPS and such)If multiple interaction capabilities are present these should be always in alphabetical order to reduce fingerprinting.
The Attention level indicator
None
: No screen, Headless, Server-to-Server ... so no human attention at all.Low
: You can expect to not gat a response at all from the user as they have other priorities. Common usage: CarMedium
: The user should be able to respond within a minute. Common usage: TV (time to find the remote)High
: The user should be able to respond within 1 or 2 seconds. Common usage: Normal Websites, GamingKinds of field values I would expect
Note that it may seem to add a lot of entropy but I think it doesn't because just about all phones will have the same list here and from the other headers it is already known to be a phone. Same for all Tablets, all game consoles, etc.
To be discussed: How to fit this into the header.