← Back to glossary
🧱

Content Security Policy (CSP)

Web Security

A browser rule that limits what a web page can load and run.

Definition

CSP is a security setting that tells the browser which scripts and resources a website is allowed to load.

In plain English A browser rule that limits what a web page can load and run.

Why this matters

Why it matters: It helps reduce XSS attacks that can steal cookies and personal data.

Example

Example: A site blocks unknown JavaScript sources using CSP.