TopicsLimited availability
The topics API reports a user's likely subject-matter interests (as determined by the browser, known as topics) to iframes. This allows for interest-based advertising that does not rely on user's exact browsing history, third-party cookies, or fingerprinting.
Not yet supported in all major browsers — check the table and provide a fallback.
Discouraged: Following the announcement that Chrome will maintain its current approach to third-party cookies, Chrome decided to withdraw certain Privacy Sandbox features including the topics API.
Browser support
How to use
Not supported in Chrome, Edge, Firefox, Safari, Chrome Android, Firefox Android, Safari iOS. Use feature detection below and provide a fallback (or a polyfill) for those browsers.
Example
Full syntax and examples are on MDN: browsingTopics.
Feature detection
if ("Document" in globalThis && "browsingTopics" in Document.prototype) {
// Document.browsingTopics is available
}Sub-features
Support for each part of the feature (9). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| Document.browsingTopics | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| HTMLIFrameElement.browsingTopics | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ | ✕ |
| Request.Request.options_parameter.browsingTopics | 126 | 126 | ✕ | ✕ | 126 | ✕ | ✕ |
| fetch.options_parameter.browsingTopics | 126 | 126 | ✕ | ✕ | 126 | ✕ | ✕ |
| iframe.allow.browsing-topics | 115 | 115 | ✕ | ✕ | 115 | ✕ | ✕ |
| iframe.browsingtopics | 126 | 126 | ✕ | ✕ | 126 | ✕ | ✕ |
| http.headers.Observe-Browsing-Topics | 115 | 115 | ✕ | ✕ | 115 | ✕ | ✕ |
| http.headers.Permissions-Policy.browsing-topics | 115 | 115 | ✕ | ✕ | 115 | ✕ | ✕ |
| http.headers.Sec-Browsing-Topics | 115 | 115 | ✕ | ✕ | 115 | ✕ | ✕ |