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

HTTP Headers

Sec CH UA Bitness

HTTP Header

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-Bitness</code> request header is a user agent client hint which provides the “bitness” of the user-agent’s underlying CPU architecture.
This is the size in bits of an integer or memory address—typically 64 or 32 bits.

This might be used by a server, for example, to select and offer the correct binary format of an executable for a user to download.

This header is categorized as a Request header and a Client hint. It is a forbidden request header, as it has a Sec- prefix.

Syntax

Syntax

http
Sec-CH-UA-Bitness: &lt;bitness&gt;

Directives

<bitness>

A string indicating the underlying platform architecture bitness, such as “64” or “32”.

Example

Examples

A server can request the Sec-CH-UA-Bitness header by including Accept-CH in a response to any request from the client, with the header’s name as a token:

http
HTTP/1.1 200 OK
Accept-CH: Sec-CH-UA-Bitness

The client may decide to provide this hint and include the Sec-CH-UA-Bitness header in subsequent requests.
For example, on a Windows-based 64-bit computer, the client might add the header as demonstrated below:

http
GET /my/page HTTP/1.1
Host: example.site

Sec-CH-UA: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"
Sec-CH-UA-Mobile: ?0
Sec-CH-UA-Platform: "Windows"
Sec-CH-UA-Bitness: "64"

How to Modify Header using Requestly

Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Sec-CH-UA-Bitness header. This is especially useful for testing how your application handles information about the device’s processor architecture during development or debugging. Steps to Modify the Sec-CH-UA-Bitness 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-Bitness.
    • In the “Header Value” field, enter your desired bitness value (e.g., “64”).
  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 configured, Requestly will inject the Sec-CH-UA-Bitness: 64 header into all matching requests, allowing you to simulate different CPU architecture scenarios and test how your server or application responds to those conditions.

Modifying the Sec-CH-UA-Bitness header can help developers test how their web applications behave on devices with different CPU architectures (like 32-bit vs 64-bit). This is useful for optimizing performance and compatibility in varied environments.