System Design · Middle · Question 40 of 75

The unread message counter differs between tabs. How do you fix it?

Explanation

Each tab is a separate app with its own state. BroadcastChannel passes changes between them; you can also keep a single server connection in a SharedWorker and broadcast events to tabs.

Further reading

Problem with a question

System Design · Middle · question 40

Test yourself

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

Take this quiz