Node.js · Middle · Question 40 of 75

Which cookie attributes help protect a session cookie?

Explanation

HttpOnly hides the cookie from JavaScript (limits XSS damage), Secure sends it only over HTTPS and SameSite helps against CSRF.

Further reading

Problem with a question

Node.js · Middle · question 40

Test yourself

Take the Node.js · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz