Browser & Web Performance · Middle · Question 60 of 75

Why does CSP with 'unsafe-inline' in script-src provide little XSS protection?

Explanation

Most XSS payloads are inline. Use nonces or hashes so only scripts you put on the page can run.

Further reading

Problem with a question

Browser & Web Performance · Middle · question 60

Test yourself

Take the Browser & Web Performance · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz