Sec Browsing Topics
The HTTP Sec-Browsing-Topics request header transmits the selected topics for the current user along with the associated request. This information is utilized by an ad technology platform to select a personalized advertisement to display. If the calling site has not successfully completed the privacy sandbox enrollment process to include the Topics API, any attempt to create or modify the Sec-Browsing-Topics header will fail silently, and any existing Sec-Browsing-Topics header will be removed.
Non-standard: This feature is not standardized. We advise against using non-standard features in production environments, as their browser support is limited, and they may be altered or removed. Nevertheless, they can be suitable in specific cases where no standard option exists.
Deprecated: This feature is no longer recommended. Although some browsers might still support it, it may have been removed from relevant web standards, could be in the process of being dropped, or might only be retained for compatibility. Avoid using it and update any existing code if possible; consult the compatibility table at the bottom of this page for guidance. This feature may stop functioning at any time.
Warning: This feature is currently opposed by two browser vendors. Refer to the Standards positions section for details regarding this opposition.
Note: An enrollment process is necessary to use this feature in your applications.
For additional details, see Using the Topics API.
| Header type | Request header |
|---|---|
| Forbidden request header | Yes (Sec- prefix) |
Syntax
Sec-Browsing-Topics: <array-of-observed-topics>
Directives
This header contains a JSON object, which is an array of up to three objects. Each object represents the current user’s selected topics for the last three epochs and includes the following properties:
configVersion
A string that identifies the algorithm (excluding the model portion) used to compute the topic.
modelVersion
A string that indicates the model employed to categorize a string (such as a web page’s hostname) into specific topic identifiers.
taxonomyVersion
A string that specifies the version of the taxonomy used.
topic
A number representing the topic’s ID, which the browser can use to retrieve the topic from the taxonomy.
version
The configVersion, modelVersion, and taxonomyVersion values, joined together with colons (:) in between them.
Examples
The exact property values may vary depending on the browser implementation. For instance, a header received from Chrome might appear as follows:
Sec-Browsing-Topics: [{configVersion: "chrome.1", modelVersion: "1", taxonomyVersion: "1", topic: 43, version: "chrome.1:1:1"}]
This feature is not part of an official standard, although it is described in the Topics API Unofficial Proposal Draft.
How to Modify Header using Requestly
Requestly is a powerful Chrome extension that allows you to modify HTTP headers, including the Sec-Browsing-Topics header. This is useful when you want to test how your application handles browsing topics sent by the browser as part of the Topics API during development or debugging. Steps to Modify the Sec-Browsing-Topics 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-Browsing-Topics.
- In the “Header Value” field, enter a test value (for example, <array-of-observed-topics>).
- Set the URL condition: Specify the URL or pattern where this header change should apply (for example, https://your-website.com/\*).
- Save the rule.
Once configured, Requestly will inject the Sec-Browsing-Topics header into all matching requests. For example, using Sec-Browsing-Topics: <array-of-observed-topics> lets you simulate topic data being sent to your server.
You might need to modify the Sec-Browsing-Topics header to test how your backend, ad tech integrations, or analytics systems handle topic data, without changing your actual server setup. This helps you validate behavior and ensure everything works as expected before deploying to product
Set headers visually: intercept and modify HTTP headers without touching your code using Requestly.
Download Free →