Sec CH UA Mobile
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
The HTTP Sec-CH-UA-Mobile request header is a user 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 a low entropy hint.
Unless blocked by a user agent permission policy, it is sent by default, without the server opting in by sending Accept-CH.
| Header type |
Request header,
Client hint |
| — | — |
| Forbidden request header | Yes (Sec- prefix) |
Syntax
Syntax
Sec-CH-UA-Mobile: <boolean>
Directives
?1 indicates that the user-agent prefers a mobile experience (true).
?0 indicates that user-agent does not prefer a mobile experience (false).
Examples
Examples
Using Sec-CH-UA-Mobile
Since Sec-CH-UA-Mobile is a low entropy hint, it is typically included in all requests.
A desktop browser usually sends requests with the following header:
Sec-CH-UA-Mobile: ?0
A browser on a mobile device generally includes the following header in its requests:
Sec-CH-UA-Mobile: ?1
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Sec-CH-UA-Mobile header. This is useful for testing how your website or app behaves when accessed from different types of devices, such as mobile or desktop. Steps to Modify the Sec-CH-UA-Mobile Header:
- Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
- Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
- Add a new header modification:
- Under “Action”, select “Add” or “Override”.
- In the “Header Name” field, enter Sec-CH-UA-Mobile.
- In the “Header Value” field, enter either ?1 to simulate a mobile device or ?0 for desktop.
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-website.com/\*).
- Save the rule.
Once applied, Requestly will inject the Sec-CH-UA-Mobile header with your chosen value into matching requests. This helps you test how your site adapts to mobile versus desktop environments without needing to switch actual devices.
Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.
Download Free →