Add more Sec-CH Client Hint headers#28636
Conversation
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
caugner
left a comment
There was a problem hiding this comment.
LGTM overall, just some nits about documenting alternative names.
Assuming I need Accept-CH: Viewport-Width to get Viewport-Width, and Accept-CH: Sec-CH-Viewport-Width to get Sec-CH-Viewport-Width, maybe these aren't strictly equivalent, but it might be useful for readers to find these mentioned in the BCD table of the corresponding SEC-CH-* headers.
Are there plans to remove those unprefixed headers, or does this depend on usage counts?
That is correct. You can in theory also ask for them both and get both! Though not sure why you'd want to do that...
I think
Yeah, ideally we'd drop them, but usage count is too high for that. Part of my reasoning for documenting this in MDN (and marking old names as deprecated) is an effort to push that along. Can't blame people for not switching when we only doucment the old ones! Anyway, TLDR I think they will continue to both be supported for some time. |
|
Should be good for another look @caugner FYI |
Summary
Adds the following Client Heights as supported by Chrome:
Sec-CH-Device-MemorySec-CH-DPRSec-CH-Viewport-HeightSec-CH-Viewport-WidthTest results and supporting details
Visiting https://browserleaks.com/client-hints with Chrome shows the following:
Note that
Sec-CH-Device-Memoryis currently still specced asDevice-Memorybut I've opened a PR to change thatDevice-Memory, DPR and Width were added in Chrome 97: https://chromestatus.com/feature/6658223894429696 (note Device-Memory was not noted there)
Height was added in Chrome 105: https://chromestatus.com/feature/5646861215989760
Related issues
MDN Content PR: mdn/content#42351