Interview practice question
Keeping state in sync across browser tabs
Frontend Engineering · Async JavaScript and the Browser · Intermediate
When users log out in one tab, other open tabs still appear logged in. How do you sync state across tabs?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- BroadcastChannel API.
- storage event from localStorage changes.
- Notify other tabs on logout/login.
- Re-check session on focus.
- Server-side session validation.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.