Skip to content
Learn · Security

What is Content Security Policy (CSP)?

CSP is a header that tells browsers which sources of scripts, styles and images your page may load.

Why it matters

It limits the damage of XSS attacks.

Practical tip

Begin with a report-only policy to find what your site legitimately loads.

Frequently asked questions

What is Content Security Policy (CSP)?

CSP is a header that tells browsers which sources of scripts, styles and images your page may load.

Why does Content Security Policy (CSP) matter for my website?

It limits the damage of XSS attacks.

Any practical tip about Content Security Policy (CSP)?

Begin with a report-only policy to find what your site legitimately loads.

Related terms

More about security