Sec-CH-UA-Form-Factors header
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
The HTTPSec-CH-UA-Form-Factorsrequest header is auser agent client hint which provides information on the user-agent's device form factor.
| Header type | Request header,Client hint |
|---|---|
| Forbidden request header | Yes (Sec- prefix) |
In this article
Syntax
Sec-CH-UA-Form-Factors: <form-factor>Sec-CH-UA-Form-Factors: <form-factor>, …, <form-factor>Directives
<form-factor>A string indicating a common device form factor.All applicable form factors can be included.The meanings of the allowed values are:
"Desktop"A user-agent running on a personal computer.
"Automotive"A user-agent embedded in a vehicle, where the user may be responsible for operating the vehicle and have limited ability to interact.
"Mobile"Small, touch-oriented device typically carried on a user's person.
"Tablet"A touch-oriented device larger than
"Mobile"and not typically carried on a user's person."XR"Immersive devices that augment or replace the environment around the user.
"EInk"A device characterized by slow screen updates and limited or no color resolution.
"Watch"A mobile device with a tiny screen (typically less than 2 inches), carried in such a way that the user can glance at it quickly.
Examples
>Using Sec-CH-UA-Form-Factors
A server requests theSec-CH-UA-Form-Factors header by including theAccept-CH in aresponse to any request from the client, using the name of the desired header as a token:
HTTP/1.1 200 OKAccept-CH: Sec-CH-UA-Form-FactorsThe client may choose to provide the hint, and add theSec-CH-UA-Form-Factors header to subsequent requests.For example, the client might add the header as shown:
GET /my/page HTTP/1.1Host: example.siteSec-CH-UA-Mobile: ?0Sec-CH-UA-Form-Factors: "EInk"In this case,"EInk" means that the device is characterized by slow screen updates and limited color resolution, and as such, responses may differ depending on this hint.
Specifications
| Specification |
|---|
| User-Agent Client Hints> # sec-ch-ua-form-factors> |