Server-Sent Events
also called SSE, EventSource
A one-way streaming protocol over plain HTTP in which the server pushes text events to the client on a long-lived response.
Where the flow is server-to-client only — notifications, progress updates, live dashboards, streaming LLM tokens — SSE is usually the better choice than WebSockets and is frequently overlooked.
Its advantages are all consequences of being ordinary HTTP: it works through proxies and firewalls that
mishandle upgrades, it is compressed and cached by existing infrastructure, and the browser's
EventSource reconnects automatically with an event ID so the server can resume from where the
client left off. That automatic reconnection removes a meaningful amount of client code.
Limitations: one direction only (the client uses ordinary requests to send), text only, and on HTTP/1.1 it consumes one of the browser's six connections per origin — a real constraint that HTTP/2 multiplexing removes.
Reach for WebSockets when the traffic is genuinely bidirectional and frequent.