SSE (Server-Sent Events, EventSource API) — a standard for streaming data from server to client over plain HTTP. Client opens a GET to the endpoint with Accept: text/event-stream, the server keeps the connection open and sends messages as they are ready. Unlike WebSocket: unidirectional (server→client only), works through any HTTP proxy, native auto-reconnect, no Upgrade handshake.
Below: details, example, related terms, FAQ.
data: {json}\n\nLast-Event-ID headerconst es = new EventSource('/stream');
es.onmessage = e => console.log(JSON.parse(e.data));
es.addEventListener('user-login', e => {...});Server-only push (notifications, live feed). Simpler code, works through proxies. For chat/games you need WebSocket.
Yes. Browser reconnects with exponential backoff + sends <code>Last-Event-ID</code>.
For a dashboard with 10+ SSE feeds — yes. Use a single multiplex endpoint or migrate to HTTP/2/3.