ua-client-hints icon indicating copy to clipboard operation
ua-client-hints copied to clipboard

Guidance of structure of values

Open jwrosewell opened this issue 5 years ago • 3 comments

One of the problems that this document is attempting to solve is the unstructured nature of the User-Agent field value. The document does not currently provide sufficient guidance to implementors concerning the structure of each field value. The document should aim to be as explicit as those related to other HTTP header values if it is to be successful in solving this problem.

See this pull request which incorporates experiment feedback and review from interested users and other stakeholders for proposed text changes.

jwrosewell avatar Sep 23 '20 18:09 jwrosewell

Any specific example that's missing?

yoavweiss avatar Oct 26 '20 08:10 yoavweiss

A modern computer is made up of different components. This includes at least a) the hardware; b) the operating system; and c) the user agent (web browser) or application. Choosing header names that align to these components and then structuring the information in a consistent form to make extracting and using the relevant information simple for as many developers as possible would be the most efficient and easiest approach to the data model and value structure.

jwrosewell avatar Oct 27 '20 11:10 jwrosewell

I think we've made progress on this issue, at least in so far as I understand it:

https://wicg.github.io/ua-client-hints/#sec-ch-ua-platform now provides SHOULD-level guidance on OS names (it's not a MUST because new platforms can exist).

https://wicg.github.io/ua-client-hints/#sec-ch-ua is pretty well defined now (but wasn't when this issue was filed).

As for https://wicg.github.io/ua-client-hints/#sec-ch-ua-model, I'm not sure how useful guidance will be because models (the hardware in the previous comment) can vary so widely. But perhaps we can provide guidance on the maximum length of such a value (related to #179).

Does that address your concerns @jwrosewell? As far as literal structure of values, sh-string and sh-list are well-defined so that should make consistent parsing possible for developers and other consumers of the info.

miketaylr avatar Feb 08 '21 23:02 miketaylr

I think we can close this as fixed.

miketaylr avatar Oct 20 '25 17:10 miketaylr