Sec-CH-UA-Mobile header
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental:This is anexperimental technology
Check theBrowser compatibility table carefully before using this in production.
Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.
The HTTPSec-CH-UA-Mobilerequest header is auser agent client hint which indicates whether the browser is on a mobile device.It can also be used by a desktop browser to indicate a preference for a "mobile" user experience.
Sec-CH-UA-Mobile is alow entropy hint.Unless blocked by a user agent permission policy, it is sent by default, without the server opting in by sendingAccept-CH.
| Header type | Request header,Client hint |
|---|---|
| Forbidden request header | Yes (Sec- prefix) |
In this article
Syntax
Sec-CH-UA-Mobile: <boolean>Directives
<boolean>?1indicates that the user-agent prefers a mobile experience (true).?0indicates that user-agent does not prefer a mobile experience (false).
Examples
>Using Sec-CH-UA-Mobile
AsSec-CH-UA-Mobile is alow entropy hint it is typically sent in all requests.A desktop browser would usually send requests with the following header:
Sec-CH-UA-Mobile: ?0A browser on a mobile device would usually send requests with the following header:
Sec-CH-UA-Mobile: ?1Specifications
| Specification |
|---|
| User-Agent Client Hints> # sec-ch-ua-mobile> |