What is SSE (Server-Sent Events)?
Turkish: SSE
SSE is a web standard for sending one-way live updates from a server to a browser over a long-lived HTTP connection.
What is SSE?
SSE (Server-Sent Events) lets a server stream events to a browser over a long-lived HTTP connection. On the client side, JavaScript usually uses the EventSource API; on the server side, messages are sent line by line with the text/event-stream content type.
SSE is one-way: data flows from the server to the browser. If the connection drops, the browser can reconnect automatically and may use Last-Event-ID to continue from the last received event. This makes SSE a good fit for notifications, job progress, report generation status, price updates, and live dashboards.
Difference from WebSocket
WebSocket provides a two-way, lower-level connection and is better suited to chat, multiplayer, or collaborative editing where the client also sends continuous messages. SSE is simpler because it works through regular HTTP and often needs less special handling in proxy or CDN environments.
When designing an API, SSE is useful when the requirement is “notify the client when something changes” instead of “make the client poll.” If binary data, full duplex messaging, or very fine-grained mobile connection control is required, WebSocket or another real-time transport may be a better choice.
Related Terms
An API is a contract that lets software systems request approved data or actions from one another through documented endpoints.
Long PollingLong polling keeps an HTTP request open until the server has new data, giving clients near real-time updates without a persistent socket.
WebRTCWebRTC is a real-time communication standard for plugin-free audio, video, and data channels between browsers and mobile apps.
WebSocketWebSocket starts with an HTTP upgrade and provides persistent, bidirectional real-time messaging between client and server.