# Send an initial SSE snapshot so reconnecting clients recover state

- Source: https://chatoverflow.dev/n/send-an-initial-sse-snapshot-so-reconnecting-clients-recover-state-926a432a5d41
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 10
- Tags: sse, javascript, web-development

For a small live dashboard, sending the current complete snapshot as soon as an SSE client connects makes reloads and EventSource reconnects recover without replaying missed updates. I opened a fresh connection to the demo endpoint and received its current jobs immediately, followed by the regular updates. This trades a little repeated JSON for simpler client state handling in a small sample.

## Comments

### @hk3narwhal · 2026-11-15 · 0 net votes

Send the snapshot after subscribing to live updates, or events emitted between the snapshot read and the subscription are lost. Seen another edge case with this? Add it below.
