Web Security Headers interview questions

42 real Web Security Headers questions from the Security bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What is Content-Security-Policy (CSP)?

Junior
  1. A.header controlling how much referrer information browsers send with requests
  2. B.CSP mode that reports violations without blocking, used to tune a policy before enforcing
  3. C.Cross-Origin Resource Sharing, headers that relax the same-origin policy in a controlled way
  4. D.header restricting which sources of scripts, styles, and other content a page may load
Reveal the answer + AI explanation — free account

2. Which term means: "header restricting which sources of scripts, styles, and other content a page may load"?

Junior
  1. A.X-Content-Type-Options
  2. B.Content-Security-Policy (CSP)
  3. C.SameSite cookie attribute
  4. D.Same-origin policy
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.Content-Security-Policy (CSP) — header set to nosniff to stop browsers from MIME-sniffing responses to a different content type
  2. B.Content-Security-Policy (CSP) — header restricting which sources of scripts, styles, and other content a page may load
  3. C.Content-Security-Policy (CSP) — integrity attribute letting browsers verify a fetched script/style matches an expected hash
  4. D.Content-Security-Policy (CSP) — HSTS header instructing browsers to only connect over HTTPS for a set duration
Reveal the answer + AI explanation — free account

4. What is X-Frame-Options?

Junior
  1. A.header controlling whether a page can be framed, defending against clickjacking
  2. B.cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
  3. C.header restricting which sources of scripts, styles, and other content a page may load
  4. D.HSTS header instructing browsers to only connect over HTTPS for a set duration
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.X-Frame-Options — header controlling how much referrer information browsers send with requests
  2. B.X-Frame-Options — header controlling whether a page can be framed, defending against clickjacking
  3. C.X-Frame-Options — Cross-Origin Resource Sharing, headers that relax the same-origin policy in a controlled way
  4. D.X-Frame-Options — cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
Reveal the answer + AI explanation — free account

7. What is Strict-Transport-Security?

Junior
  1. A.flag ensuring a cookie is only sent over HTTPS connections
  2. B.HSTS header instructing browsers to only connect over HTTPS for a set duration
  3. C.CSP mode that reports violations without blocking, used to tune a policy before enforcing
  4. D.browser rule restricting how a document from one origin can interact with resources from another
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Junior
  1. A.Strict-Transport-Security — CSP mode that reports violations without blocking, used to tune a policy before enforcing
  2. B.Strict-Transport-Security — Cross-Origin Resource Sharing, headers that relax the same-origin policy in a controlled way
  3. C.Strict-Transport-Security — header controlling whether a page can be framed, defending against clickjacking
  4. D.Strict-Transport-Security — HSTS header instructing browsers to only connect over HTTPS for a set duration
Reveal the answer + AI explanation — free account

10. What is X-Content-Type-Options?

Junior
  1. A.flag preventing JavaScript from reading a cookie, reducing token theft via XSS
  2. B.header set to nosniff to stop browsers from MIME-sniffing responses to a different content type
  3. C.header controlling which browser features (camera, geolocation, etc.) a page may use
  4. D.per-response random token allowing only matching inline scripts to execute under CSP
Reveal the answer + AI explanation — free account

11. Which term means: "header set to nosniff to stop browsers from MIME-sniffing responses to a different content type"?

Junior
  1. A.Content-Security-Policy (CSP)
  2. B.X-Content-Type-Options
  3. C.Permissions-Policy
  4. D.CSP report-only mode
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Junior
  1. A.X-Content-Type-Options — integrity attribute letting browsers verify a fetched script/style matches an expected hash
  2. B.X-Content-Type-Options — browser rule restricting how a document from one origin can interact with resources from another
  3. C.X-Content-Type-Options — cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
  4. D.X-Content-Type-Options — header set to nosniff to stop browsers from MIME-sniffing responses to a different content type
Reveal the answer + AI explanation — free account

13. What is Referrer-Policy?

Junior
  1. A.header controlling how much referrer information browsers send with requests
  2. B.integrity attribute letting browsers verify a fetched script/style matches an expected hash
  3. C.flag ensuring a cookie is only sent over HTTPS connections
  4. D.Cross-Origin Resource Sharing, headers that relax the same-origin policy in a controlled way
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Junior
  1. A.Referrer-Policy — header controlling which browser features (camera, geolocation, etc.) a page may use
  2. B.Referrer-Policy — browser rule restricting how a document from one origin can interact with resources from another
  3. C.Referrer-Policy — flag ensuring a cookie is only sent over HTTPS connections
  4. D.Referrer-Policy — header controlling how much referrer information browsers send with requests
Reveal the answer + AI explanation — free account

16. What is SameSite cookie attribute?

Mid
  1. A.cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
  2. B.browser rule restricting how a document from one origin can interact with resources from another
  3. C.flag ensuring a cookie is only sent over HTTPS connections
  4. D.header controlling how much referrer information browsers send with requests
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Mid
  1. A.SameSite cookie attribute — cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
  2. B.SameSite cookie attribute — per-response random token allowing only matching inline scripts to execute under CSP
  3. C.SameSite cookie attribute — flag ensuring a cookie is only sent over HTTPS connections
  4. D.SameSite cookie attribute — HSTS header instructing browsers to only connect over HTTPS for a set duration
Reveal the answer + AI explanation — free account

19. What is HttpOnly cookie flag?

Mid
  1. A.header controlling which browser features (camera, geolocation, etc.) a page may use
  2. B.per-response random token allowing only matching inline scripts to execute under CSP
  3. C.browser rule restricting how a document from one origin can interact with resources from another
  4. D.flag preventing JavaScript from reading a cookie, reducing token theft via XSS
Reveal the answer + AI explanation — free account

21. Which statement is correct?

Mid
  1. A.HttpOnly cookie flag — header controlling how much referrer information browsers send with requests
  2. B.HttpOnly cookie flag — integrity attribute letting browsers verify a fetched script/style matches an expected hash
  3. C.HttpOnly cookie flag — flag preventing JavaScript from reading a cookie, reducing token theft via XSS
  4. D.HttpOnly cookie flag — flag ensuring a cookie is only sent over HTTPS connections
Reveal the answer + AI explanation — free account

22. What is Secure cookie flag?

Mid
  1. A.header controlling which browser features (camera, geolocation, etc.) a page may use
  2. B.flag ensuring a cookie is only sent over HTTPS connections
  3. C.integrity attribute letting browsers verify a fetched script/style matches an expected hash
  4. D.header set to nosniff to stop browsers from MIME-sniffing responses to a different content type
Reveal the answer + AI explanation — free account

24. Which statement is correct?

Mid
  1. A.Secure cookie flag — cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
  2. B.Secure cookie flag — flag ensuring a cookie is only sent over HTTPS connections
  3. C.Secure cookie flag — header set to nosniff to stop browsers from MIME-sniffing responses to a different content type
  4. D.Secure cookie flag — header controlling whether a page can be framed, defending against clickjacking
Reveal the answer + AI explanation — free account

25. What is CORS?

Mid
  1. A.header controlling whether a page can be framed, defending against clickjacking
  2. B.HSTS header instructing browsers to only connect over HTTPS for a set duration
  3. C.Cross-Origin Resource Sharing, headers that relax the same-origin policy in a controlled way
  4. D.header restricting which sources of scripts, styles, and other content a page may load
Reveal the answer + AI explanation — free account

27. Which statement is correct?

Mid
  1. A.CORS — per-response random token allowing only matching inline scripts to execute under CSP
  2. B.CORS — browser rule restricting how a document from one origin can interact with resources from another
  3. C.CORS — Cross-Origin Resource Sharing, headers that relax the same-origin policy in a controlled way
  4. D.CORS — header controlling how much referrer information browsers send with requests
Reveal the answer + AI explanation — free account

28. What is Permissions-Policy?

Mid
  1. A.browser rule restricting how a document from one origin can interact with resources from another
  2. B.header controlling which browser features (camera, geolocation, etc.) a page may use
  3. C.HSTS header instructing browsers to only connect over HTTPS for a set duration
  4. D.integrity attribute letting browsers verify a fetched script/style matches an expected hash
Reveal the answer + AI explanation — free account

30. Which statement is correct?

Mid
  1. A.Permissions-Policy — header controlling which browser features (camera, geolocation, etc.) a page may use
  2. B.Permissions-Policy — browser rule restricting how a document from one origin can interact with resources from another
  3. C.Permissions-Policy — header controlling how much referrer information browsers send with requests
  4. D.Permissions-Policy — cookie flag (Lax/Strict/None) limiting cross-site sending to mitigate CSRF
Reveal the answer + AI explanation — free account

Showing 30 of 42 Web Security Headers questions — the full set, with answers, explanations and an AI tutor on every question, is inside.

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice Web Security Headers free