🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: HTTPS, Cookies and Headers: all 10 questions

Quiz: HTTPS, Cookies and Headers · Question 4 of 10

Which header helps prevent clickjacking?

Which header helps prevent clickjacking?

  1. A.X-Content-Type-Options: nosniff
  2. B.Content-Security-Policy: frame-ancestors 'none'
  3. C.Referrer-Policy
  4. D.Cache-Control
Answer & explanation

Correct answer: Content-Security-Policy: frame-ancestors 'none'

frame-ancestors (or the older X-Frame-Options: DENY) stops other sites from loading your page inside a frame.

Can you get the rest right without peeking?

Take the timed Quiz: HTTPS, Cookies and Headers quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →