---
url: "https://web.dev/articles/cross-origin-isolation-guide"
titulek: "A guide to enable cross-origin isolation | Articles | web.dev"
h1: "A guide to enable cross-origin isolation Stay organized with collections Save and categorize content based on your preferences."
popis: "Cross-origin isolation enables a web page to use powerful features such as SharedArrayBuffer. This article explains how to enable cross-origin isolation on your website."
jazyk: "en"
kanonicka: "https://web.dev/articles/cross-origin-isolation-guide"
drobecky: ["Articles", "A guide to enable cross-origin isolation"]
zdroj: "live"
wayback_snapshot: ""
stazeno: "2026-09-13 22:29:07"
znaku: 7846
slov: 1076
kodovani: "iso-8859-2"
sha256: "b062b2fe7a8f217c94458abbc8df1513b919d2eaf5b6842879a975234cb63b7c"
---
A guide to enable cross-origin isolation
Stay organized with collections
Save and categorize content based on your preferences.
Cross-origin isolation enables a web page to use powerful features such as
SharedArrayBuffer. This article explains how to enable cross-origin
isolation on your website.
Eiji Kitamura
This guide shows you how to enable cross-origin isolation. Cross-origin
isolation is required if you want to use
[`SharedArrayBuffer`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer),
[`performance.measureUserAgentSpecificMemory()`](/articles/monitor-total-page-memory-usage),
or [high resolution timer with better precision](https://developer.chrome.com/blog/cross-origin-isolated-hr-timers). If you intend to enable cross-origin isolation, evaluate the impact this will
have on other cross-origin resources on your website, such as ad placements. Determine where in your website `SharedArrayBuffer` is used Starting in Chrome 92, functionalities that use `SharedArrayBuffer`
will no longer work without cross-origin isolation. If you landed on this page
due to a `SharedArrayBuffer` deprecation message, it's likely either
your website or one of the resources embedded on it is using `SharedArrayBuffer`.
To ensure nothing breaks on your website due to deprecation, start by
identifying where it's used.
If you are not sure where in your site a `SharedArrayBuffer` is used, there are two ways find out: Using Chrome DevTools (Advanced) Using Deprecation Reporting If you already know where you are using `SharedArrayBuffer`, skip to Analyze the impact of cross-origin isolation.
Using Chrome DevTools [Chrome DevTools](https://developer.chrome.com/docs/devtools/open)
allow developers to inspect websites. [Open the Chrome
DevTools](https://developer.chrome.com/docs/devtools/open) on the page you suspect might be using `SharedArrayBuffer`. Select the **Console** panel. If the page is using `SharedArrayBuffer`, the following message will show up:[Deprecation] SharedArrayBuffer will require cross-origin isolation as of M92, around May 2021. See for more details. common-bundle.js:535 The filename and the line number at the end of the message (for example, `common-bundle.js:535`)
indicate where the `SharedArrayBuffer` is coming from. If it's a third-party library,
contact the developer to fix the issue. If it's implemented as part of your website, follow
the guide below to enable cross-origin isolation.
DevTools Console warning when SharedArrayBuffer is used without cross-origin isolation.
(Advanced) Using Deprecation Reporting Some browsers have [a reporting functionality of deprecating
APIs](https://wicg.github.io/deprecation-reporting/) to a specified endpoint. [Set up a deprecation report server and get the reporting
URL](/articles/coop-coep#observe_issues_using_the_reporting_api). You can achieve this by either
using a public service or building one yourself. Using the URL, set the following HTTP header to pages that are potentially
serving `SharedArrayBuffer`.Report-To: {"group":"default","max_age":86400,"endpoints":[{"url":"THE_DEPRECATION_ENDPOINT_URL"}]} Once the header starts to propagate, the endpoint you registered to should
start collecting deprecation reports. See [an example implementation](https://cross-origin-isolation.glitch.me).
Analyze the impact of cross-origin isolation Wouldn't it be great if you could assess the impact that enabling cross-origin
isolation would have on your site without actually breaking anything? The
[`Cross-Origin-Opener-Policy-Report-Only`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy) and
[`Cross-Origin-Embedder-Policy-Report-Only`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy)
HTTP headers allow you to do just that. Set [`Cross-Origin-Opener-Policy-Report-Only:
same-origin`](/articles/coop-coep#1_set_the_cross-origin-opener-policy_same-origin_header_on_the_top-level_document)
on your top-level document. As the name indicates, this header only sends
reports about the impact that `COOP: same-origin` **would** have on your
siteâit won't actually disable communication with popup windows. Set up reporting and configure a web server to receive and save the reports. Set [`Cross-Origin-Embedder-Policy-Report-Only:
require-corp`](/articles/coop-coep#3_use_the_coep_report-only_http_header_to_assess_embedded_resources)
on your top-level document. Again, this header lets you see the impact of
enabling `COEP: require-corp` without actually affecting your site's
functioning yet. You can configure this header to send reports to the same
reporting server that you set up in the previous step. Mitigate the impact of cross-origin isolation After you have determined which resources will be affected by cross-origin
isolation, here are general guidelines for how you actually opt-in those
cross-origin resources: On cross-origin resources such as images, scripts, stylesheets, iframes, and
others, set the [`Cross-Origin-Resource-Policy:cross-origin`](https://resourcepolicy.fyi/#cross-origin)
header. On same-site resources, set [`Cross-Origin-Resource-Policy:same-site`](https://resourcepolicy.fyi/#same-origin) header. For resources loadable using [CORS](/articles/cross-origin-resource-sharing), make
sure it is enabled, by setting the `crossorigin` attribute in its HTML tag
(for example, `
`). For JavaScript fetch
request, make sure `request.mode` is set to `cors`. If you want to use powerful features such as `SharedArrayBuffer` inside a
loaded iframe, append `allow="cross-origin-isolated"` to the `