DevTools Logo

Cross-Origin Isolation Header Helper

Cross-Origin Isolation Header Helper

Generate the exact COOP/COEP header trio for SharedArrayBuffer and WASM threads, then diagnose a pasted header set.

Runs in your browser
Try an example

Policy options

same-origin · require-corp

CORP is sent by the subresource host, not by your HTML response.

Which COEP mode should I use?

Answer three questions to pick require-corp or credentialless.

Deployment snippet

2 headers · 0 warnings
# Cross-origin isolation: put this block at server level or repeat it in every location.
# Keep all add_header directives at one level: add_header in a `location` block replaces inherited ones from `server`/`http`.
# Check proxy_pass setups — an upstream or CDN can replace these headers; verify with curl -I.
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;

CORP on the subresource server

Under require-corp, every cross-origin image, font, script and iframe must opt in with CORP or CORS. Add this header on the asset host or CDN response — document headers alone cannot fix a blocked embed.

# Cross-Origin-Resource-Policy goes on the subresource response (your CDN/asset server), not just the HTML document.
add_header Cross-Origin-Resource-Policy "cross-origin" always;

Diagnose pasted response headers

Paste the response headers of the document (DevTools → Network → the main HTML request → Headers). Header names are case-insensitive; nothing is uploaded.

Response headers

Paste headers to see why isolation is off

Checks COOP, COEP, report-only variants, duplicates and reporting endpoints.

Why each header exists

Why SharedArrayBuffer needs isolation

Shared memory and high-resolution timers can leak data through Spectre-style side channels. Browsers grant them only when a document opts out of sharing a process with cross-origin windows (COOP) and restricts cross-origin embeds (COEP). Only COOP: same-origin plus a non-unsafe COEP makes window.crossOriginIsolated true.

What CORP does on subresources

Cross-Origin-Resource-Policy is sent by the resource server. It opts a response into being embedded under require-corp; CORS mode is the alternative. Document headers cannot show whether an embed cooperates — check the Network panel for blocked resources.

Popup implications of COOP values

same-origin severs the opener link both ways and is required for isolation. same-origin-allow-popups keeps references to popups you open (OAuth, payments) but does not grant isolation. unsafe-none keeps cross-origin opener access.

Browser support (verified 2026-11-27)
FeatureChromiumFirefoxSafari
require-corpYesYesYes
credentiallessYesYesNo
COEP/COOP -Report-Only + report-toYesNoYes (16.4+)

Recheck MDN browser-compat-data before relying on these values for a new rollout.

Report-only rollout checklist

1) Declare Reporting-Endpoints with an https URL. 2) Deploy the -Report-Only headers and watch coop/coep reports (Chromium and Safari 16.4+; Firefox does not send them). 3) Fix or replace every resource named in a report. 4) Switch the Report-Only toggle off to enforce the headers. Report-only alone never isolates the page.

Verify in DevTools

Run window.crossOriginIsolated in the console after a hard reload. In the Network panel, confirm both headers on the document response (not only on subresources), and watch for blocked embeds. Workers and iframes have their own inheritance rules — check them separately.

Details

SharedArrayBuffer, high-resolution timers and WASM threads are gated behind cross-origin isolation: a document must send both Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp (or credentialless) on its own response. This helper turns those rules into copy-ready nginx, Apache, Express, Cloudflare Transform Rule, Netlify, Vite and webpack snippets, explains that CORP belongs on subresource responses, and offers a decision helper for the credentialless vs require-corp trade-off. Paste a response-header set into the diagnose panel to get named findings — including the same-origin-allow-popups trap and report-only-only configurations — plus a safe report-only rollout path. All generation and diagnosis happens in your browser tab; nothing is uploaded. Browser support notes were verified on 2026-11-27: require-corp works in Chromium, Firefox and Safari; credentialless works in Chromium and Firefox but not Safari; -Report-Only headers and report-to ship in Chromium and Safari 16.4+ but not Firefox.

More examples

Fix SharedArrayBuffer is not defined

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Both headers must be on the HTML document response; window.crossOriginIsolated then becomes true.

Credentialless mode for third-party images

Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: credentialless

Cross-origin images no longer need CORP, but requests drop cookies and Safari does not support credentialless.

nginx snippet

add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;

Keep the directives at one config level: a location-level add_header replaces inherited headers.

CORP on the asset server

Cross-Origin-Resource-Policy: cross-origin

Under require-corp, each cross-origin subresource must opt in on its own response.

    Examples

    Minimum isolation trio

    Input
    COOP same-origin + COEP require-corp
    Output
    window.crossOriginIsolated === true

    Both headers are required on the document response; COEP alone never grants isolation.

    Third-party images without CORP

    Input
    COEP credentialless
    Output
    Images load without cookies

    credentialless relaxes the CORP requirement but is unavailable in Safari.

    Diagnose a false positive

    Input
    COOP same-origin-allow-popups + COEP require-corp
    Output
    Finding: coop-allow-popups-not-isolating

    Only same-origin COOP grants isolation; the wizard explains the popup trade-off.

    About this tool

    The Cross-Origin Isolation Header Helper writes the exact response-header pair — Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Embedder-Policy (COEP) — that a browser needs before it exposes SharedArrayBuffer, high-resolution timers and WASM threads. Without that pair, feature detection fails with `ReferenceError: SharedArrayBuffer is not defined` even when your JavaScript is correct.

    Choose the COOP value and COEP mode, then copy a deployment-ready snippet for nginx, Apache, Express, Cloudflare Transform Rules, Netlify, Vite or webpack. A decision helper explains when credentialless is safe, and a Report-Only variant supports a staged rollout before anything breaks in production.

    The diagnose panel checks a pasted document response-header set, names the missing or ineffective header, distinguishes enforced policies from -Report-Only variants, and explains the one thing it cannot see: whether your subresources send CORP or allow CORS. Everything runs in the browser tab.

    What this tool does not do

    • This tool generates header text; it does not apply headers to a live server or audit a running site.
    • Diagnosis sees only pasted document headers, not the CORP/CORS responses of embedded subresources.
    • Browser support notes were verified on 2026-11-27 and should be rechecked before a new rollout.
    • Report-Only and report-to are unavailable in Firefox, so reports are a partial sample of traffic.

    How to use this tool

    1. Pick the policy

      Choose COOP same-origin and a COEP mode; run the decision helper if third-party embeds or Safari are involved.

    2. Copy a stack snippet

      Switch deployment tabs and copy the generated headers, and the CORP snippet for your asset server.

    3. Roll out safely

      Enable Reporting and Report-Only first, review coop/coep reports, then switch to enforced headers.

    4. Diagnose

      Paste the document response headers to see named findings and the fix for each one; verify with window.crossOriginIsolated.

    Use cases

    Multithreaded WASM

    Unblock SharedArrayBuffer and worker threads for a compute-heavy app running on localhost or in production.

    Edge header rollout

    Emit identical policies across nginx, Apache, Cloudflare and Netlify so staging and production agree.

    Incident triage

    Paste response headers from DevTools and see exactly why crossOriginIsolated is still false.

    Policy values and their effect

    Header / valueMeaning
    COOP: same-originRequired for cross-origin isolation; severs opener links both ways.
    COOP: same-origin-allow-popupsKeeps popups you open reachable, but does NOT enable isolation.
    COEP: require-corpEvery cross-origin embed needs CORP or CORS; widest browser support.
    COEP: credentiallessCross-origin no-cors requests lose cookies; no CORP needed. Not in Safari.
    *-Report-Only + report-toObserve violations before enforcing; Chromium and Safari 16.4+, not Firefox.
    CORP on the asset responseLets a subresource opt into being embedded under require-corp.

    Header names are case-insensitive. Both enforced headers must be on the HTML document response, not just on assets.

    Common mistakes

    Mistake:Setting COEP without COOP same-origin.

    Fix:Both headers are required; same-origin-allow-popups and unsafe-none do not grant isolation.

    Mistake:Setting the headers only on assets or only on the CDN.

    Fix:The document response must carry the enforced pair; assets need CORP/CORS, not COOP/COEP.

    Mistake:Treating -Report-Only headers as enforcement.

    Fix:Report-Only only collects violations. Deploy the enforced headers once reports are clean.

    Frequently asked questions

    Why do I need COOP and COEP for SharedArrayBuffer?

    SharedArrayBuffer and high-resolution timers can amplify Spectre-style side channels, so browsers expose them only to cross-origin isolated documents. That requires both Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp (or credentialless) on the HTML response. COEP alone, or COOP: same-origin-allow-popups, leaves window.crossOriginIsolated false.

    credentialless vs require-corp — which should I choose?

    Use require-corp when you need broad browser support or credentialed subresources; every cross-origin embed must opt in through CORP or CORS. Choose credentialless only when third-party embeds cannot be changed and they do not need cookies, and when Safari is not a target. The built-in decision helper asks those three questions and explains its answer.

    Do images and scripts need CORP too?

    Under require-corp, yes: cross-origin images, fonts, scripts, iframes and fetches made in no-cors mode must either send a Cross-Origin-Resource-Policy header or be loaded through CORS. Put CORP on the resource server or CDN response, not on your document. The diagnosis panel cannot see those headers — inspect blocked requests in the Network panel.

    Does Safari support credentialless?

    No. As of 2026-11-27, Chrome/Chromium and Firefox support COEP: credentialless, while Safari does not. If the page must work in Safari, use require-corp and audit your third-party resources. Report-Only headers and the report-to parameter are available in Chromium and Safari 16.4+, but not Firefox.

    How do I check whether crossOriginIsolated is true?

    After a hard reload, open DevTools and run window.crossOriginIsolated in the console. Then check that both enforced headers appear on the main HTML response in the Network panel. If the value is false, paste those headers into the diagnose panel: it names the missing COOP, an unsafe COEP value, or a report-only-only configuration.

    Can I roll this out without breaking production?

    Yes. Turn on Reporting with an https endpoint and the Report-Only toggle to emit the -Report-Only variants. Watch coop/coep reports, fix or replace the resources they name, then switch the toggle off to enforce. Report-Only never isolates the page, so do not treat a clean report stream as isolation.

    References & standards