HTTP Headers
Sec CH UA Platform
Experimental: This is an experimental technology
Review the browser compatibility table carefully before deploying this in production environments.
Secure context: This feature is accessible only within secure contexts (HTTPS) in some or all supported browsers.
The HTTP <strong>Sec-CH-UA-Platform</strong> request header is a user agent client hint that provides information about the platform or operating system where the user agent is running.
For example: “Windows” or “Android”.
<code>Sec-CH-UA-Platform</code> is a low entropy hint.
Unless blocked by a user agent permission policy, it is sent by default (without the server explicitly requesting it through sending <code>Accept-CH</code>).
Header type | Request header, Client hint |
---|---|
Forbidden request header | Yes (<code>Sec-</code> prefix) |
Syntax
Sec-CH-UA-Platform: <platform>
Directives
One of the following strings: "Android", "Chrome OS", "Chromium OS", "iOS", "Linux", "macOS", "Windows", or "Unknown".
Example
Examples
Using Sec-CH-UA-Platform
As Sec-CH-UA-Platform
is a low entropy hint, it is typically included in all requests. A browser running on a macOS device might add the following header to each request:
Sec-CH-UA-Platform: "macOS"
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-Platform.
- In the “Header Value” field, enter your preferred platform string (e.g., “Windows” or “Android”).
- Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
- Save the rule.
Once set up, Requestly will inject the Sec-CH-UA-Platform header with your chosen value into all matching requests, allowing you to simulate different platform environments and test how your application adapts to varied client platforms.
Modifying the Sec-CH-UA-Platform header helps you understand how your site or app responds to different operating systems or platforms without needing actual devices, making testing easier and more efficient.
Table of Contents
- No headings found.