Topics API header demo

This page links to three sites that show how topics can be marked as observed, and then accessed, by using the headers from a `fetch()` request.

(By comparison, the demo sites linked from call document.browsingTopics() from an iframe to observe and access topics.)

Run the demo

Open Chrome 111 (or above) from the command line using the following feature flags:


Make sure that chrome://flags/#privacy-sandbox-ads-apis is disabled, since the defaults from this will override the command-line flags (in particular, the epoch duration).

This site is awaiting enrollment, so enable chrome://flags/#privacy-sandbox-enrollment-overrides and add the following URLs:,,,,,,,,,

Alternatively, include the command line flag --args --disable-features=EnforcePrivacySandboxAttestations

Each of the following sites makes the same fetch() request to

Open each of these in a new browser tab. Observed topics will be displayed on these pages after three epochs have passed, i.e. after around 45 seconds if you have set the epoch length to 15 seconds, though it may take longer. The observed topics are likely to be those such as 299 or 328 that correspond to an interest in sports and tennis.

If no topics are displayed, navigate repeatedly to the pages listed above, e.g. by refreshing each page (not hard-refresh).

This demo isn't anything like a real-world implementation: it only serves to show how topics can be marked as observed, and accessed, using headers.