Deprecating support for XHR

ยอดดู 898 ครั้ง
ข้ามไปที่ข้อความที่ยังไม่อ่านรายการแรก

Sam Dutton

ยังไม่อ่าน,
11 ส.ค. 2566 10:39:2111/8/66
ถึง Topics 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.


ตอบทุกคน
ตอบกลับผู้สร้าง
ส่งต่อ
ข้อความใหม่ 0 รายการ