How to Configure Permissions Policy to Disable Topics API and FLoC in Google Chrome

As third-party cookies face phaseout across modern browsers, alternative behavioral profiling mechanisms—such as Google’s Privacy Sandbox Topics API (the successor to FLoC)—have emerged. The Topics API enables browsers to observe user browsing activity across participating websites and calculate high-level interest topics that are exposed to third-party ad tech vendors via JavaScript APIs (document.browsingTopics()). For enterprise portals, healthcare providers, and privacy-focused web applications, permitting interest cohort calculations on sensitive pages represents a significant compliance and confidentiality risk. By deploying strict HTTP Permissions Policy headers, site administrators can opt out of Topics API calculations entirely.

Understanding Topics API Directives in Permissions Policy

The Permissions Policy response header (formerly Feature Policy) provides fine-grained controls allowing servers to selectively enable or disable browser platform capabilities. The specific directive governing Topics API participation is browsing-topics:

  • browsing-topics=(): Completely disables the Topics API for the top-level document and all nested cross-origin iframes. Chrome will not calculate interest categories from this site or return active topics to embedded scripts.
  • browsing-topics=(self): Restricts Topics API querying strictly to same-origin scripts, barring third-party advertising trackers from calling the API.
  • interest-cohort=(): The legacy directive utilized for FLoC (Federated Learning of Cohorts). Maintaining this directive ensures compatibility with older Chromium distributions.

Configuring Web Server Headers to Disable Topics Tracking

Configure your production reverse proxy or web server to deliver the opt-out policy with every response:

# Nginx server block configuration
add_header Permissions-Policy "browsing-topics=(), interest-cohort=(), run-ad-auction=(), join-ad-interest-group=()" always;

# Apache HTTP Server (.htaccess / virtual host)
Header always set Permissions-Policy "browsing-topics=(), interest-cohort=(), run-ad-auction=(), join-ad-interest-group=()"

This header comprehensively opts out of the complete Privacy Sandbox ad-targeting suite, including Protected Audience auctions (FLEDGE) and interest group joining.

Auditing Topics API Policy Enforcement in Chrome DevTools

To verify that Google Chrome is respecting your server’s opt-out policy:

  1. Open Google Chrome and navigate to your website.
  2. Press Ctrl + Shift + I (or Option + Command + I on macOS) to open DevTools.
  3. Switch to the Console tab and attempt to call the Topics API:
    document.browsingTopics()
  4. Verify that Chrome rejects the promise with a security exception:
    Uncaught (in promise) DOMException: Failed to execute 'browsingTopics' on 'Document': The browsing-topics feature is disabled by Permissions Policy.
  5. Open the Application tab, scroll down to Background Services, and select Interest groups or Topics API to confirm that no domain observations are recorded.

Ensuring Third-Party Iframe Isolation

If your website embeds external video players, maps, or widgets, ensure third-party iframes cannot circumvent your policy. When defining an <iframe> tag, explicitly omit the browsing-topics permission from the allow attribute: <iframe src="https://partner.example.com" allow="fullscreen"></iframe>.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.