Security · Response header
Cross-Origin-Opener-Policy
Isolates your browsing context from cross-origin windows (COOP).
What is Cross-Origin-Opener-Policy?
Cross-Origin-Opener-Policy (COOP) severs the link between your page and any cross-origin window that opened it or that it opens, so they can't share a browsing context group. With `same-origin` it's one half (alongside COEP) of enabling cross-origin isolation, which unlocks powerful APIs like SharedArrayBuffer and precise timers.
Typical usage
Set `same-origin` on documents that need cross-origin isolation or want to block cross-origin window references (window.opener attacks).
Examples
Isolate the browsing context
Cross-Origin-Opener-Policy: same-originAllow popups but isolate
Cross-Origin-Opener-Policy: same-origin-allow-popupsAlso known as
Also commonly written as: coop header · cross-origin-opener-policy · cross origin opener policy · coop same-origin. These variants — including plural forms, unhyphenated spellings, and Japanese (ヘッダ) — all refer to the same Cross-Origin-Opener-Policy HTTP header.
Specification
HTML Standard
Frequently asked questions
What is the Cross-Origin-Opener-Policy HTTP header?
Cross-Origin-Opener-Policy (COOP) severs the link between your page and any cross-origin window that opened it or that it opens, so they can't share a browsing context group. With `same-origin` it's one half (alongside COEP) of enabling cross-origin isolation, which unlocks powerful APIs like SharedArrayBuffer and precise timers.
Is Cross-Origin-Opener-Policy a request or response header?
Cross-Origin-Opener-Policy is a response header — the server sends it to the client. Set `same-origin` on documents that need cross-origin isolation or want to block cross-origin window references (window.opener attacks).
What does a Cross-Origin-Opener-Policy header look like?
A typical Cross-Origin-Opener-Policy header looks like: Cross-Origin-Opener-Policy: same-origin (Isolate the browsing context).
Related headers
Cross-Origin-Resource-Policy
Blocks other origins from embedding your resource (CORP).
Strict-Transport-Security
Force browsers to use HTTPS for a domain (HSTS).
Content-Security-Policy
The primary defense against XSS: whitelist trusted sources.
X-Frame-Options
Prevents clickjacking by controlling framing.
X-Content-Type-Options
Disables MIME-type sniffing.
Referrer-Policy
Controls the Referer header sent on outgoing links and requests.