Your SSE Connection Dropped. Now What? Building Resumable Server-Sent Events in JavaScript
TL;DR — SSE reconnects are easy; recovering the events you missed is not. The fix is id + Last-Event-ID on the client and replay on the server. Below: the problem, the protocol, a minimal Node.js repl