Which mechanism prevents the browser from executing a script injected into a page via a malicious third-party source?

Web Development Hard

Web Development — Hard

Which mechanism prevents the browser from executing a script injected into a page via a malicious third-party source?

Key points

  • CSP restricts script execution sources
  • CSP mitigates XSS and data injection
  • CSP is enforced via HTTP headers

Ready to go further?

Related questions