Modern browser architectures enforce process isolation to prevent untrusted cross-origin assets from leaking sensitive data through side-channel timing attacks. Cross-Origin Embedder Policy (COEP) ensures that a document can only load external resources that explicitly grant permission to be embedded. In Google Chrome, pairing COEP with Cross-Origin Opener Policy (COOP) activates full cross-origin isolation, unlocking multi-threaded SharedArrayBuffer contexts and hardware-synchronised WebGPU memory buffers.
Understanding COEP Directives: require-corp vs credentialless
The Cross-Origin-Embedder-Policy HTTP response header supports two primary enforcement modes:
require-corp: The strictest standard. Requires every loaded subresource (such as images, scripts, stylesheets, and iframes) to provide a validCross-Origin-Resource-Policy(CORP) header or be served with CORS approval. If a third-party asset omits these headers, Chrome blocks it instantly.credentialless: Introduced in Chromium to simplify deployment. Loads cross-origin resources without cookies, client certificates, or HTTP credentials, allowing assets to load without requiring remote servers to implement CORP headers.unsafe-none: Default behaviour where subresources load without embedder restrictions.
Configuring Web Server COEP Headers
Configure your production web server to issue the required COEP and COOP headers:
# Nginx server block configuration
add_header Cross-Origin-Opener-Policy "same-origin" always;
add_header Cross-Origin-Embedder-Policy "require-corp" always;
# Apache HTTP Server (.htaccess / virtual host)
Header always set Cross-Origin-Opener-Policy "same-origin"
Header always set Cross-Origin-Embedder-Policy "require-corp"
Auditing Blocked Subresources in Chrome DevTools
When transitioning an existing web application to COEP, external subresources that lack explicit CORP headers fail to load:
- Open Google Chrome and navigate to the application.
- Open Chrome DevTools by pressing Ctrl + Shift + I (or Option + Command + I on macOS).
- Select the Console panel to view blocked network requests:
GET https://cdn.example.com/widget.js net::ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep 200 (OK) - Open the Issues tab in DevTools. Under the Cross-Origin Embedder Policy section, Chrome lists each violating asset alongside specific remediation instructions.
- Verify that your top-level window reports
crossOriginIsolated === truein the JavaScript console.
Testing Deployments with Report-Only Headers
To identify incompatible third-party dependencies before enforcing strict blocking in production, deploy the report-only directive:
Cross-Origin-Embedder-Policy-Report-Only: require-corp; report-to="coep-endpoint"
Chrome evaluates all embedded resources against the policy and dispatches JSON violation reports to your telemetry collector without breaking user-facing multimedia or payment frames.