DevToolsmith

Cross-Origin-Opener-Policy Header

The Cross-Origin-Opener-Policy response header separates your page from cross-origin windows it opens or is opened by (COOP).

Type
Response header
Category
Security
Defined in
HTML Standard

Syntax

Cross-Origin-Opener-Policy: unsafe-none  |  same-origin-allow-popups  |  same-origin

How Cross-Origin-Opener-Policy works

With same-origin, a cross-origin popup or opener gets no window.opener reference to your page, which blocks a class of cross-window attacks and is one of the two headers needed for cross-origin isolation (SharedArrayBuffer, precise timers). It can break OAuth and payment popups that talk back through window.opener; same-origin-allow-popups keeps those working.

Directives

Value Meaning
unsafe-none The default: no isolation.
same-origin-allow-popups Isolated from openers, but popups you open keep a reference to you.
same-origin Full isolation from cross-origin windows.

Examples

Cross-origin isolation (with COEP)
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Embedder-Policy: require-corp

Check it

curl -sI https://example.com | grep -i '^cross-origin-opener-policy:'

Paste a full set of response headers into the HTTP header checker to get every header explained and common mistakes flagged.

Related headers

More security headers

Content-Security-Policy , Strict-Transport-Security , X-Content-Type-Options , Referrer-Policy , Permissions-Policy .

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does the Cross-Origin-Opener-Policy header do?

The Cross-Origin-Opener-Policy response header separates your page from cross-origin windows it opens or is opened by (COOP). With same-origin, a cross-origin popup or opener gets no window.opener reference to your page, which blocks a class of cross-window attacks and is one of the two headers needed for cross-origin isolation (SharedArrayBuffer, precise timers). It can break OAuth and payment popups that talk back through window.opener; same-origin-allow-popups keeps those working.

How do I see the Cross-Origin-Opener-Policy header?

Run "curl -sI https://example.com" to print a response’s headers, or open the Network tab in your browser’s dev tools and select the request. Paste the headers into the HTTP header checker on this site to get each one explained.