Sec-CH-UA-Platform Header

Table of Content

The Sec-CH-UA-Platform header is a member of Structured Headers for Client Hints. It is aimed at providing hints that assist servers to optimize responses based on the device's software and hardware configuration. Specifically, this header tells the server about the platform of the User-Agent (the browser or tool making the requests) to enable content adaptation based on specific platform needs.

Syntax

Sec-CH-UA-Platform: "<platform>"

The <platform> is typically the operating system of user agent. For example, "Windows", "iOS", "Android", etc.

Directives

The Sec-CH-UA-Platform has no specific directives. Its value part should contain a string with the platform’s brand.

Examples

Sec-CH-UA-Platform: "Windows"
Sec-CH-UA-Platform: "iOS"
Sec-CH-UA-Platform: "Android"

Browser Compatibility

Browser Compatibility
Chrome Supported
Firefox Not Supported
Safari Not Supported
Opera Supported
Edge Supported

How to modify Sec-CH-UA-Platform header

ModHeader is a Google Chrome extension that can modify HTTP requests headers. It can be used to modify the Sec-CH-UA-Platform header to test how your servers behave on receiving requests from different platforms.

Here's how to use it:

  1. Install ModHeader from the Chrome Web Store.
  2. Click on the ModHeader icon.
  3. Input Sec-CH-UA-Platform in the 'Response header' section.
  4. Below it, input the platform string you want to mimic, like "iOS".

Such modification can help in testing and debugging, especially to ensure that your server's responses are adapted correctly for different platforms.