HTTP Headers
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 <code>Sec-CH-UA-Mobile</code> 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 <code>Accept-CH</code>.
Header type | Request header, Client hint |
---|---|
Forbidden request header | Yes (Sec- prefix) |
Syntax
Syntax
Sec-CH-UA-Mobile: <boolean>
Directives
<boolean>
<code>?1</code> indicates that the user-agent prefers a mobile experience (true).<br><code>?0</code> indicates that user-agent does not prefer a mobile experience (false).
Example
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
- 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.
Table of Contents
- No headings found.