Search⌘ K
AI Features

X-XSS-Protection

Explore how the X-XSS-Protection HTTP header protects web applications from reflected cross-site scripting attacks in older browsers. Understand its syntax, browser support limitations, and why it has been largely replaced by Content Security Policy standards.

We'll cover the following...

Introduction

Although superseded by CSP, the X-XSS-Protection header provides a similar type of protection. Unsupported by Firefox, this header is used to mitigate XSS attacks in older browsers that don’t fully support CSP.

The syntax is very similar to what we’ve just seen.

X-XSS-Protection: 1;
...