| | 2 | |
| | 3 | 1. Here’s how Content Security Policy can provide a way for server administrators to reduce or eliminate their XSS attack surface. Website administrators specify which domains the browser should treat as valid sources of script. |
| | 4 | |
| | 5 | 2. The browser will only execute script in source files from the white-listed domains and will disregard everything else, including inline scripts and event-handling HTML attributes. |
| | 6 | - Note: event-handling is still enabled in CSP without using HTML attributes. |
| | 7 | |
| | 8 | 3. Sites that never want to have JavaScript included in their pages can choose to globally disallow script. |