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

Quiz: CSRF and CORS · Question 3 of 10

Why is SameSite=Lax effective against CSRF?

Why is SameSite=Lax effective against CSRF?

  1. A.The cookie isn't sent on cross-site POSTs and background requests
  2. B.It encrypts the cookie
  3. C.It hides the cookie from JavaScript
  4. D.It makes the cookie expire quickly
Answer & explanation

Correct answer: The cookie isn't sent on cross-site POSTs and background requests

Lax cookies are only sent cross-site on top-level GET navigations, so forged POSTs arrive without a session.

Can you get the rest right without peeking?

Take the timed Quiz: CSRF and CORS quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →