System Design · Junior · Question 54 of 75

What does the browser do with cookies that localStorage doesn't do?

Explanation

Automatic sending is convenient for sessions but enables CSRF, so cookies need flags like SameSite, HttpOnly and Secure.

Further reading

Problem with a question

System Design · Junior · question 54

Test yourself

Take the System Design · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz