New Topics API header format

Skip to first unread message

Sam Dutton

Jun 6, 2023, 1:42:49 PM6/6/23
to Topics API announcements
Hi all,

Last year we announced support for Topics via headers, in requests initiated via Fetch and (temporarily) XHR. More recently, we announced that we plan to extend support to request headers for iframes. The initially proposed format for the request header looked like this:

Sec-Browsing-Topics: 186;version="chrome.1:1:2206021246";config_version="chrome.1";
model_version="2206021246";taxonomy_version="1", 265;version="chrome.1:1:2206021246";config_version="chrome.1";

There were some drawbacks to the format, including size and potential security issues. To address these concerns, we are announcing a new request header format:

Sec-Browsing-Topics: (1 2);v=chrome.1:1:2, ();p=P000000000

Note that the topics are grouped by version now. More examples are available in the Topics API spec. Padding (the p=P000000000 parameter in the code example above) is included to ensure a consistent header length, feel free to ignore it when parsing. These changes are available beginning in Chrome 115.
Reply all
Reply to author
0 new messages