Content Security Policy (CSP)
type: TechArticle
description: A CSP tells browsers which sources of script, style, image, and frame content to trust. A good policy stops most XSS and data-exfiltration attacks dead.
language: en
is part of: Web Specification Studio
author: Web Specification Studio
publisher: Web Specification Studio
license: https://creativecommons.org/licenses/by/4.0/
date modified: 2026-07-09T00:00:00.000Z
citation: Content Security Policy Level 3
  type: CreativeWork
  publisher: W3C
citation: MDN — Content-Security-Policy
  type: CreativeWork
  publisher: MDN
citation: OWASP — Content Security Policy Cheat Sheet
  type: CreativeWork
  publisher: OWASP
citation: Google — Strict CSP
  type: CreativeWork
  publisher: web.dev

Web Specification Studio
type: WebSite

Web Specification Studio
type: Organization

breadcrumb
type: BreadcrumbList
item list element: Home
  type: ListItem
  position: 1
  item: https://webspecification.com/
item list element: Spec
  type: ListItem
  position: 2
  item: https://webspecification.com/spec/
item list element: Security
  type: ListItem
  position: 3
  item: https://webspecification.com/spec/security/
item list element: Content Security Policy (CSP)
  type: ListItem
  position: 4
  item: https://webspecification.com/spec/security/content-security-policy/