Firefox Tomorrow

http header

Sec-CH-UA-Form-Factors header

View on MDN ↗

Secure contextLimited availability

The HTTP Sec-CH-UA-Form-Factors request header is a user agent client hint which provides information on the user-agent’s device form factor.

Header type [Request header](https://developer.mozilla.org/en-US/docs/Glossary/Request%20header), Client hint
[Forbidden request header](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden%20request%20header) Yes (Sec- prefix)

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 the Sec-CH-UA-Form-Factors header by including the Accept-CH in a response to any request from the client, using the name of the desired header as a token:

HTTP/1.1 200 OK
Accept-CH: Sec-CH-UA-Form-Factors

The client may choose to provide the hint, and add the Sec-CH-UA-Form-Factors header to subsequent requests. For example, the client might add the header as shown:

GET /my/page HTTP/1.1
Host: example.site

Sec-CH-UA-Mobile: ?0
Sec-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

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also