Background tabs and the seat hold
16 Nov 2026
- A hidden tab no longer gives up its game after 3 minutes.
- When a connection drops, the player’s seat is kept for 15 s (60 s from a hidden tab), and the page tries to reconnect every second.
Browsers throttle background tabs and networks drop for a moment. Hold seats for drops, not for players who said goodbye.
A seat hold works like this. When a connection closes without a goodbye message, the server keeps the player’s seat for a short time, and the page reconnects into it. Any real-time browser game needs this, because browsers throttle and freeze background tabs, and networks drop for a moment. The wiki page How TagBalls is built describes the current state.
What dropped healthy games
- After 3 minutes in a background tab, the page gave up its own seat, even when the connection was healthy.
- A moment offline replaced the game with the offline page.
What changed
- The page keeps its connection however long the tab is hidden. The room’s idle rules still apply: an idle player moves to watching after 12 minutes and leaves the game 15 minutes after that.
- The browser slows down a hidden tab’s timers. So the hidden tab sends its pings along with replies to the room’s messages, and it tells the room that it is hidden.
- A game stays open through a moment offline.
- The seat hold: if the connection closes without a goodbye, the seat is kept for 15 s, or 60 s from a hidden tab. The ball stands still, and no bot takes it over. The page tries every second to reconnect with the room’s id. The room recognizes the player by account or by browser, so they keep the same id and the same team, with no screen in between. After the hold runs out, a bot stands in for the player and drives the ball until they return.
- “You were away” shows only when the page’s last message is older than the hold. One click brings the player back into the same game.
Reuse
- Tell the server when the tab is hidden. Then it can hold the seat longer and will not mistake a throttled tab for a dead one.
- When timers are throttled, send pings along with replies to server messages.
- Tell leaving on purpose (a goodbye message) apart from a drop, and hold the seat only for drops.