这是indexloc提供的服务,不要输入任何密码
Skip to content

Make Sec-CH-UA-Form-Factor a list, add meanings #343

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

Merged
merged 4 commits into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -552,18 +552,43 @@ The header's ABNF is:
The 'Sec-CH-UA-Form-Factor' Header Field {#sec-ch-ua-form-factor}
------------------------------

The <dfn http-header>`Sec-CH-UA-Form-Factor`</dfn> request header field gives a server information
about the [=user agent=]'s [=form-factor=]. It is a [=Structured Header=] whose value MUST be a
[=structured header/string=]. Its value SHOULD match one of the following common form-factor values:
"Automotive", "Mobile", "Tablet", "TV", "VR", "XR", "Unknown" or the empty string.
[[!RFC8941]].
The <dfn http-header>`Sec-CH-UA-Form-Factor`</dfn> request header field gives a
server information about the [=user agent=]'s [=form-factor=]. It is a
[=Structured Header=] whose value MUST be a [=structured header/list=]
[[!RFC8941]]. The header's values MUST be given in lexical order.

The header SHOULD describe the form-factor of the device using one or more of
the following common form-factor values: "Desktop", "Automotive", "Mobile",
"Tablet", or "XR". All applicable form-factor values SHOULD be included.

<div class="note" heading="">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading="" seems to be required in order to get the green "NOTE:"?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's weird! You can also just do:

Note: .... and it'll generate the markdown for you.

https://speced.github.io/bikeshed/#notes-etc does reference the heading attribute. But if what you have works, I'm not particularly worried about it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a note at all? It seems like important normative content

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding was that the language is too vague to be normative, and making it more precise would be counter-productive. But I definitely can't afford an editor's hat, so I'll defer to those with better headware.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have strong opinions one way or the other here, and it's easy to swap between the two.


The form-factor of a user-agent describes how the user interacts with the
user-agent. The meanings of the allowed values are:

* "Desktop" refers to a user-agent running on a personal computer.
* "Automotive" refers to a user-agent embedded in a vehicle, where the user
may be responsible for operating the vehicle and unable to attend to small
details.
* "Mobile" refers to small, touch-oriented device typically carried on a
user's person.
* "Tablet" refers to a touch-oriented device larger than "Mobile" and not
typically carried on a user's person.
* "XR" refers to immersive devices that augment or replace the environment
around the user.

A new value should be proposed and added to the specification when there is a
new form-factor that users interact with in a meaningfully different way; a
compelling use-case where sites would like to change how they interact with
users on that device; and no reliable way to identify that new form-factor
using existing hints.

Note: A "desktop" form-factor would be represented by the empty string.
</div>

The header's ABNF is:

~~~ abnf
Sec-CH-UA-Form-Factor = sf-string
Sec-CH-UA-Form-Factor = sf-list
~~~

The 'Sec-CH-UA-Full-Version' Header Field {#sec-ch-ua-full-version}
Expand Down