Cross-Origin-Embedder-Policy (COEP)
The Cross-Origin-Embedder-Policy (COEP) HTTP response header prevents a document from loading any cross-origin resources that do not explicitly grant the document permission (using CORP or CORS).
Why COEP is Crucial
Following the discovery of speculative execution side-channel vulnerabilities (such as Spectre and Meltdown), web browsers disabled high-resolution timers (performance.now()) and powerful APIs like SharedArrayBuffer to prevent malicious scripts from reading process memory across origins.
COEP is one half of the modern Cross-Origin Isolation standard (paired with COOP). When enabled, the browser puts your web page in an isolated operating system process, unlocking high-performance multithreading and precision audio/video processing while ensuring no rogue cross-origin data can be leaked.
Supported Directives
Cross-Origin-Embedder-Policy: credentialless
There are two primary values for COEP:
credentialless(Recommended 2026 Standard): Cross-origin resources that do not provide CORP headers are fetched without credentials (no cookies, HTTP auth, or client certificates). This allows third-party assets (like Google Fonts, YouTube embeds, or weather widgets) to load without breaking your site!require-corp: The browser will strictly block any cross-origin subresource unless the external server responds with an explicitCross-Origin-Resource-Policyheader.unsafe-none: The default setting. No cross-origin isolation is enforced.
Recommended Configuration
Apache (.htaccess)
Header always set Cross-Origin-Embedder-Policy "credentialless"
Nginx
add_header Cross-Origin-Embedder-Policy 'credentialless' always;
Common Pitfall: The "require-corp" Trap
If you set COEP to require-corp, external images, analytics pixels, or fonts that lack a Cross-Origin-Resource-Policy: cross-origin header will be completely blocked in Chrome, Firefox, and Safari. Unless you control every single server hosting your subresources, always prefer credentialless.
Check Your Isolation
Use the SecurityHeaders.nl scanner to test whether your website has properly enabled COEP and achieved a maximum A++ score.