🎉 Requestly joins BrowserStack to build the future of application testing. Read more

HTTP Headers

Sec CH UA Platform

HTTP Header

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 typeRequest header,
Client hint
Forbidden request headerYes (<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

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:

  1. Install and open the Requestly Chrome extension. You can find it on the Chrome Web Store.
  2. Create a new rule: Click on “Create Rule” and choose “Modify Headers” from the list of available rule types.
  3. 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”).
  4. Set the URL condition: Specify the URL or pattern where this header change should apply (e.g., https://your-api.com/*).
  5. 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.