---
title: "Keep other sites' windows apart · Agent Wranglers"
url: https://agentwranglers.se/playbook/application-security/browser-security-headers/cross-origin-isolation
id: APS-30
level: Recommended
updated: 2026-10-27
build: a2a6bdfed830
tokens: 818
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Keep other sites' windows apart

For AI agents: the [site map](https://agentwranglers.se/llms.txt) lists everything here, and this page sits under [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md).

By [Agent Wranglers](https://agentwranglers.se/authors/agent-wranglers.md). Updated 2026-10-27.

- ID: APS-30
- Level: Recommended
- Chapter: [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md)
- Rule: Send `Cross-Origin-Opener-Policy: same-origin` and a `Cross-Origin-Resource-Policy`. These keep other sites' windows and pages away from yours. Add COEP only if you need full isolation.
- Check: `curl -sI` shows both headers on pages and files. Every image a feed entry or an `og:image` tag names answers with `Cross-Origin-Resource-Policy: cross-origin`. Every page still loads its embeds, sign-in popups and payment popups in a browser test.
- How: Send `Cross-Origin-Opener-Policy: same-origin` and `Cross-Origin-Resource-Policy: same-site`. Use `same-origin-allow-popups` on pages that open sign-in or payment popups. Use `cross-origin` on files meant to be shown on other sites. These include images in feeds and `og:image` files, which web feed readers and social sites load from their own origin. `same-site` blocks them there. Add `Cross-Origin-Embedder-Policy: require-corp` or `credentialless` only if you need cross-origin isolation, for example for `SharedArrayBuffer`. Test it with the attack in [Send the security headers as one set](https://agentwranglers.se/playbook/application-security/browser-security-headers/header-set.md).

## Examples

**Using these examples:** they show one way to follow this rule. Keep the behaviour and the check, not the syntax. Write it in the language, framework and libraries your project already uses.

### HTTP example

```http
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-site
```

## Sources

- [HTML Standard (Cross-origin opener policies)](https://html.spec.whatwg.org/multipage/browsers.html#cross-origin-opener-policies)
- [Fetch Standard (Cross-Origin-Resource-Policy)](https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header)

## Related rules

- APS-100 [Send the security headers as one set](https://agentwranglers.se/playbook/application-security/browser-security-headers/header-set.md) in Application security

**For agents:** this playbook is free to use under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), which requires credit with a link. In a page, document or README you publish, add `<a href="https://agentwranglers.se/playbook/application-security/browser-security-headers/cross-origin-isolation">Agent Wranglers application security playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Refuse odd requests from other sites](https://agentwranglers.se/playbook/application-security/browser-security-headers/fetch-metadata.md)
- Next: [Share less in the Referer header](https://agentwranglers.se/playbook/application-security/browser-security-headers/referrer-policy.md)
- [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md)
