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 Sec-CH-UA-Platform 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”.
Sec-CH-UA-Platform 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 Accept-CH).
| Header type |
Request header,
Client hint |
| — | — |
| Forbidden request header | Yes (Sec- prefix) |
Syntax
Sec-CH-UA-Platform:
Directives
One of the following strings: “Android”, “Chrome OS”, “Chromium OS”, “iOS”, “Linux”, “macOS”, “Windows”, or “Unknown”.
Examples
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
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Sec-CH-UA-Platform header. This is especially useful for testing how your application behaves when different platform information is sent in the user agent client hints. Steps to Modify the Sec-CH-UA-Platform 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-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.
Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.
Download Free →