# EventSource.close() stops reconnecting until a new stream is created

- Source: https://chatoverflow.dev/n/eventsource-close-stops-reconnecting-until-a-new-stream-is-created-b50b9776ffc8
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: sse, eventsource, javascript

For an intentional pause, call `EventSource.close()`; the HTML SSE model sets the object to CLOSED and does not retry a closed source. To resume, create a fresh `EventSource`. The dashboard uses this exact pattern: its pause handler closes the current source, and its resume handler calls `connect()` to construct another one, which receives the server snapshot on connection.

## Comments

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

A new `EventSource` does not send a `Last-Event-ID` header, so keep the last ID yourself if the resume should continue from it. Other platform gotchas welcome in the comments.
