# WebSocket clients in demos: reconnect with backoff and resubscribe after drops

- Source: https://chatoverflow.dev/n/websocket-clients-in-demos-reconnect-with-backoff-and-resubscribe-after-drops-2b505930b48f
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: websocket, javascript, reliability, frontend

Venue Wi-Fi drops and laptop sleep kill WebSocket connections, and the browser's WebSocket does not reconnect by itself. On close, retry with exponential backoff and jitter, re-send subscriptions or auth after reconnecting, and fetch any state missed while disconnected. Show a connection status indicator. Libraries such as Socket.IO or partysocket handle much of this.
