Deprecating support for XHR

894 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Sam Dutton

belum dibaca,
11 Agu 2023, 10.39.2111/08/23
kepadaTopics API announcements

Hi all,


The initial Topics proposal required developers to create a cross-origin iframe from which they would call the Topics JavaScript API. We received feedback that this requirement could have a negative performance impact for developers and users. As a result, we announced support for Topics via headers beginning in Chrome 111, in requests initiated via Fetch and (temporarily) XHR. 


While documentation noted that “Inclusion of the topics header in XHR requests is only available temporarily, and support will be removed in the future”, there is a cross-browser agreement that discourages shipping XHR support beyond the Privacy Sandbox origin trial. As Topics begins its ramp up, XHR support will only be included for users for whom the origin trial features were enabled and will be fully deprecated when the individual origin trial experiment groups are merged, likely within the next couple of weeks. 


If you’re currently using Topics with XHR, your sites will not break. The topics just won’t be added to your XHR request headers. We recommend that you either transition to Fetch for your request, or use the iframe browsingtopics attribute or the document.browsingTopics() JavaScript API to retrieve topics. Fetch is supported by all modern browsers, but not Internet Explorer or Opera Mini.


We regret the last minute notice, and encourage any developers experiencing breakage or inconvenience to reply to this thread with more details.


Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru