Cypress · Senior · Question 69 of 76

How do you check that sensitive data isn't stored in localStorage?

Show the answer

Correct answer: Inspect localStorage after login and assert absence

Explanation

Tokens or personal data in localStorage are exposed to XSS. A quick assertion guards against regressions.

Further reading

Problem with a question

Cypress · Senior · question 69

Test yourself

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

Take this quiz