topic
Verified 2026-09-18

Server-Sent Events

Server-Sent Events streams text/event-stream updates from a server to a browser client.

Use text/event-stream with no buffering, periodic heartbeats, event IDs for resumption, and a bounded reconnect policy. Authenticate the stream like any other endpoint.

httprealtimebrowserstreaming

Reference (http)

HTTP/1.1 200 OK
Content-Type: text/event-stream
Cache-Control: no-cache

data: {"state":"ready"}

Use text/event-stream with no buffering, periodic heartbeats, event IDs for resumption, and a bounded reconnect policy. Authenticate the stream like any other endpoint.

Common mistakes

  • Buffering events in a proxy, omitting reconnect/backpressure behavior, or assuming an open stream cannot outlive authorization.
Permalink: https://merginit.com/reference/http/workflow-server-sent-events