// glossary

Server-Sent Events

aka: SSE · EventSource

SSE is a way for a server to stream a sequence of messages to a connected browser over a single long-lived HTTP response.

Server-Sent Events lets the server push updates to the browser without WebSockets. The browser opens new EventSource('/stream'), the server keeps the connection open and writes data: ...\n\n per message, and the client receives them as onmessage events. Reconnect-on-disconnect is built into the browser API.

Use SSE when the data flow is server-to-client only. Live dashboards, AI streaming responses (GPT and Claude both stream tokens via SSE), notification pushes, long-running job progress all fit. When the client also needs to send messages, you want WebSockets.

The wire protocol is plain HTTP — every reverse-tunnel service handles it. Just turn off response buffering at any intermediate proxy (nginx: proxy_buffering off; for the SSE route).

Read more

// shipping?

lrok gives your localhost a public HTTPS URL with a reserved subdomain on the free plan. Useful when this term comes up in a real integration:

$ curl -fsSL https://lrok.io/install.sh | sh
$ lrok http 3000

← all glossary terms