Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What is the purpose of a Content Security Policy?

  1. A To compress responses
  2. B To restrict which sources of scripts, styles and other resources the browser will load and execute
  3. C To enforce HTTPS
  4. D To cache assets
Answer

To restrict which sources of scripts, styles and other resources the browser will load and execute

CSP is a strong defence against XSS. Even if a payload is injected, the policy can prevent inline or third-party scripts from executing.

All Front end Development MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as