ReconnectingWebSocket

JSON →
library 1.0.0 ·javascript
verified Jun 7, 2026

A small JavaScript library that decorates the WebSocket API to provide automatic reconnection when the connection is dropped. Current stable version is 1.0.0, released in 2016 with no further updates. It is API compatible with the standard WebSocket, meaning you can replace `new WebSocket('ws://...')` with `new ReconnectingWebSocket('ws://...')` with minimal code changes. Key differentiators include configurable reconnect interval, exponential backoff, and automatic retry until success.