Web Security · Senior · Question 30 of 75

Tokens kept only in memory in a SPA vs HttpOnly cookies: what's the key trade-off?

Explanation

Neither option survives XSS fully: the attacker can act in the page either way. The real difference is whether a token can be taken and used elsewhere.

Further reading

Problem with a question

Web Security · Senior · question 30

Test yourself

Take the Web Security · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz