Dev.to
6/18/2026

Fix 'SharedArrayBuffer is not defined': a practical guide to cross-origin isolation
Short summary
Cross-origin isolation, enforced via COOP + COEP headers, gates SharedArrayBuffer and multithreaded WebAssembly—a post-Spectre browser security measure. Configure both headers on your document, verify with self.crossOriginIsolated, and audit third-party assets for CORS/CORP compliance. Common gotcha: CORP isolates subresources, not your page; COOP+COEP isolate the document.
- •SharedArrayBuffer is blocked unless your page is cross-origin isolated
- •Set COOP: same-origin + COEP: require-corp on your document response
- •CORP (for subresources) and COOP/COEP (for pages) are distinct; confusion is a common mistake
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



