SpinTheMic
Pro

Interview practice question

Data from a previous user appears after switching accounts

Frontend Engineering · State Management and Data Fetching · Experienced

After logging out and logging in as another user on the same browser, some data from the previous account briefly appears. How do you fix this?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Clear all caches and stores on logout.
  • Include user/tenant in cache keys.
  • Clear persisted storage.
  • Service worker caches of API responses.
  • Treat as security issue.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics