-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #196 - Add a Sec-CH-UA-Full-Version-List client hint #250
Conversation
@erik-anderson mind providing some feedback on this PR? |
High-level question on this: Initially, @mikewest defined |
I still like the original version. :) But given the way things have evolved, I'm not sure it's worth rolling everything back. Chrome has shipped |
Hmm, that's pretty interesting, I think I missed out on that entirely! (Or knew at one point and just forgot... 🙈 ). Recapping for myself: the early design was if you requested I think folks might request And looking back to #45, I can see @yoavweiss had the same concerns. WDYT, @yoavweiss? Do we go back to the magic behavior with a different token (we could re-use this proposals One one hand, there's fewer headers over the wire if you want full-version via Also interested in feedback from @erik-anderson. |
Yeah, I agree with that description of the tension. Given that requesting for the full version should be rather rare, let's go with less magic and confusion. |
README.md
Outdated
@@ -12,7 +12,8 @@ a corresponding JavaScript API: | |||
* `Sec-CH-UA-Platform` | |||
* `Sec-CH-UA-Platform-Version` | |||
* `Sec-CH-UA` | |||
* `Sec-CH-UA-Full-Version` | |||
* `Sec-CH-UA-Full-Version` (deprecated in favor of `Sec-CH-UA-Version-List`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have use counters for Full-Version
? Could we just change its semantics in place (instead of rename)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me check on that. It would be nicer if we could...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, we might have missed the boat here with 1.6% of page loads, sadly 😿:
https://chromestatus.com/metrics/feature/timeline/popularity/3189
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yoavweiss looks like it's too high to change here. Shall we continue review assuming a new hint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.6% is an astoundingly high number. Do you have any insight into who's using this mechanism? Is there some large embedded resource that's causing this to show up on lots of sites, or are there large top-level sites opting in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We know that YouTube has been experimenting with UA-CH (and sadly we caused a crash there, oops), and we have some other partners who have committed to doing some testing.
index.bs
Outdated
|
||
1. Let |list| be a [=/list=], initially empty. | ||
1. Let |brands| be the result of running the [=create brands=] steps, with | ||
[=user agent/significant version=] passed as an argument. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unclear if what is passed is the version itself, or an instruction to operate on that version type. I think you meant the latter, but it might be worthwhile to pass an internal enum, and then refer internally to the right version type based on that enum.
Also, right now both significant version and full version are defined as a single version. It may be worthwhile to adapt their descriptions to indicate that, unlike Highlander, there can be more than one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might be worthwhile to pass an internal enum, and then refer internally to the right version type based on that enum
This sounds probably like what we want to do, but I'm not sure how to spec it. Are you aware of any other similar usage in a spec I can learn from, or have some suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yoavweiss does ac95343 look better from your perspective?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM assuming we can't change semantics
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addresses the concern I had in issue #196. Thanks!
Thanks for the review! @erik-anderson any thoughts on |
I don't think omitting it is less accurate, but it is indeed less verbose and may take someone staring at it slightly harder to understand that it provides full version numbers. I think it would be fine to omit the word "Full" and just spec it to return full versions; that's my slight preference. |
d40b280
to
01cc7d3
Compare
It should be more clear this is a type, and not a single value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! A few comments that can make it even gooder
To <dfn abstract-op>return the `Sec-CH-UA-Full-Version-List` value for a request</dfn>, perform the | ||
following steps: | ||
|
||
1. Let |version type| be the type [=user agent/full version=]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're using [=user agent/full version=] here as both the type passed and its value. It's a bit weird.
Maybe instead you can define an internal enum (or string or whatever) that you pass to the algorithm, and then inside the algorithm, split the behavior based on the enum's value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - I think I finally get what you mean. Let's land this PR here and I filed #254 to fix this up (should be able to do that this week).
|
TODO:
Sec-CH-UA-Full-Version
💥 Error: 400 Bad Request 💥
PR Preview failed to build. (Last tried on Sep 13, 2021, 9:15 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 CSS Spec Preprocessor - CSS Spec Preprocessor is the web service used to build Bikeshed specs.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.