DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Web Security Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
medium
Web Security
Why does marking a session cookie httpOnly help against XSS specifically?
A
It prevents the cookie from ever being sent over the network
B
It removes the cookie from document.cookie, so injected JavaScript can't read and exfiltrate it directly
C
It makes the cookie value encrypted
D
It has no effect on XSS, only CSRF
Check Answer