Ravindra BagaleCourses & study guides मराठी Track your progress

Ravi Sir's Cyber Security Cards › Interview Cards

Which cookie flag helps stop JavaScript on the page from reading the session cookie?

Which cookie flag helps stop JavaScript on the page from reading the session cookie? A. Secure only B. HttpOnly C. Max-Age=31536000 always D. Path=/ B. HttpOnly The HttpOnly flag tells the browser not to let JavaScript read the cookie, so an XSS bug on the page cannot steal the session cookie.

Which cookie flag helps stop JavaScript on the page from reading the session cookie? A. Secure only B. HttpOnly C. Max-Age=31536000 always D. Path=/ B. HttpOnly The HttpOnly flag tells the browser not to let JavaScript read the cookie, so an XSS bug on the page cannot steal the session cookie.
Which cookie flag helps stop JavaScript on the page from reading the session cookie? · Download PNG
Read card text

What this card says

Options

A. Secure only

B. HttpOnly

C. Max-Age=31536000 always

D. Path=/

Correct answer

B. HttpOnly

Why

The HttpOnly flag tells the browser not to let JavaScript read the cookie, so an XSS bug on the page cannot steal the session cookie.

Learn more in the lesson: 48.7 CEH-Style Practice Questions – Set B (Modules 11–20)

See all Ravi Sir's Cyber Security Cards