How to Configure Strict Cross-Origin Opener Policy (COOP) in Google Chrome

When a web page opens a secondary external link using window.open() or target="_blank", the newly spawned window retains an interactive reference to the opening document via the window.opener object. Rogue external destinations can abuse this handle through "reverse tabnabbing"—redirecting the origin tab to a fraudulent phishing clone while the user is distracted. Cross-Origin Opener Policy (COOP) severs this dangerous reference by placing the new document into an isolated top-level browsing context group. In Google Chrome, pairing COOP with Cross-Origin Embedder Policy (COEP) unlocks cross-origin isolation and high-performance WebAssembly multithreading.

Understanding COOP Directives and Browsing Context Isolation

The Cross-Origin-Opener-Policy response header supports three distinct security tiers:

  • same-origin: The strictest policy. Isolates your document exclusively to same-origin contexts. Cross-origin documents opened in new tabs receive window.opener = null, and the opener process cannot read or manipulate the target document.
  • same-origin-allow-popups: Retains opener references for popups spawned by your page, but isolates your document if opened by third-party origins. Ideal for applications handling payment or OAuth flows that communicate via postMessage.
  • unsafe-none: Default permissive behavior. Retains shared browsing context groups across origins.
  • Unlocking Powerful Web APIs: Delivering both Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp grants the document cross-origin isolated status, unlocking SharedArrayBuffer, high-resolution timers (performance.now() without jitter), and WebGPU device buffers.

Configuring COOP Headers on Web Servers

Configure your web server to deliver compliant COOP and COEP 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 / httpd.conf)
Header always set Cross-Origin-Opener-Policy "same-origin"
Header always set Cross-Origin-Embedder-Policy "require-corp"

Testing and Auditing COOP Isolation in Chrome DevTools

Verify whether your page has achieved cross-origin isolated status:

  1. Navigate to your website in Google Chrome.
  2. Press Ctrl + Shift + I (or Option + Command + I on macOS) to open DevTools.
  3. Select the Console tab and evaluate the global isolation flag:
    crossOriginIsolated

    If headers are configured correctly, the console returns true.

  4. Switch to the Application tab in DevTools:
    • In the left sidebar, select Frames > top.
    • Scroll down to the Security & Isolation section.
    • Review the Cross-Origin Opener Policy (COOP) readout: confirm that Status displays same-origin.
  5. Review the Issues tab: DevTools flags any embedded third-party widgets lacking compliant Cross-Origin-Resource-Policy (CORP) headers.

Configuring COOP Reporting for Safe Migration

Deploying strict COOP policies across complex legacy web applications can disrupt valid OAuth popups. Test policy changes safely using report-only headers:

# Deploy report-only header with Reporting API
Reporting-Endpoints: coop-reports="https://security.digitash.com/api/coop-violations"
Cross-Origin-Opener-Policy-Report-Only: same-origin; report-to="coop-reports"

Chrome logs violation reports whenever an opener boundary would have severed a window relationship, allowing engineers to audit OAuth dependencies before enforcing hard blocks.

Defending Enterprise Workstations

Pairing COOP with Chrome’s native Site Isolation architecture shields internal corporate portals against Spectre side-channel memory attacks, guaranteeing that distinct web origins execute inside separate, hardware-enforced operating system processes.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.