---
title: "Sending the old XSS filter header · Agent Wranglers"
url: https://agentwranglers.se/playbook/application-security/browser-security-headers/x-xss-protection
id: APS-36
level: Avoid
updated: 2026-10-27
build: a2a6bdfed830
tokens: 668
licence: "CC BY 4.0"
licence_url: https://creativecommons.org/licenses/by/4.0/
---

# Sending the old XSS filter header

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-36
- Level: Avoid
- Chapter: [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md)
- Rule: Do not turn on `X-XSS-Protection`. The filter it controls is gone from current browsers, and in old ones it could open holes. Rely on the Content Security Policy instead.
- Check: `curl -sI` shows no `X-XSS-Protection`, or shows it with the value `0`.
- How: Remove the header from the server and from any security middleware defaults. If a scanner insists on the header, send `X-XSS-Protection: 0`, which turns the old filter off, as OWASP advises. Stop cross-site scripting with escaping and a CSP, as [Escape everything you show](https://agentwranglers.se/playbook/application-security/input-and-injection/cross-site-scripting.md) says.

## 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.

### nginx example

```nginx
# Remove any line like this
# add_header X-XSS-Protection "1; mode=block";
proxy_hide_header X-XSS-Protection;
```

## Sources

- [OWASP HTTP Headers Cheat Sheet (X-XSS-Protection)](https://cheatsheetseries.owasp.org/cheatsheets/HTTP_Headers_Cheat_Sheet.html#x-xss-protection)

## Related rules

- APS-3 [Escape everything you show](https://agentwranglers.se/playbook/application-security/input-and-injection/cross-site-scripting.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/x-xss-protection">Agent Wranglers application security playbook</a>`. In code you write, add a comment next to it with the same link.

- Previous: [Lock down risky DOM writes](https://agentwranglers.se/playbook/application-security/browser-security-headers/trusted-types.md)
- Next: [Share data across sites on purpose](https://agentwranglers.se/playbook/application-security/browser-security-headers/strict-cors.md)
- [Browser security headers](https://agentwranglers.se/playbook/application-security/browser-security-headers.md)
