SecurityResponse Header

Cross-Origin-Opener-Policy (COOP)

Isolates your top-level browsing context from other origins, preventing cross-origin window tampering and Spectre side-channel attacks.

Recommended Production Value
Highly Recommended
same-origin

Production Server Implementation

NGINX Configuration Snippet
add_header Cross-Origin-Opener-Policy "same-origin" always;

Directives & Syntax Breakdown

same-origin

Completely isolates the window context. Cross-origin documents opened in new windows cannot access window.opener.

same-origin-allow-popups

Retains opener references for popups opened by this document.

Common Security Hazards & Pitfalls

  • β€’Required together with Cross-Origin-Embedder-Policy (COEP) to enable SharedArrayBuffer and high-resolution performance timers.
Frequently Asked Questions

Cross-Origin-Opener-Policy (COOP) - Questions & Answers

Common implementation questions, browser enforcement rules, and debugging.

It shields against cross-origin attacks such as XS-Leaks and Spectre by ensuring your web application process is completely isolated in memory.