Server-Sent Events (SSE) technology allows the server to continuously send data to the browser without the client having to make repeated requests.
SSE (Server-Sent Events) is a one-way communication channel in which the server sends events to the browser via HTTP. It’s particularly useful for displaying live data such as weather updates, stock prices, or notifications.
In the browser, the 'EventSource' object is used to receive events. The 'onmessage' event handler is triggered each time the server sends a new message.
The server must respond with the 'text/event-stream' content type and continuously send data in the correct SSE format. In a Node.js example, the current date is sent every second.
- Simpler than WebSocket in many cases - Automatic reconnection if the connection drops - Great for read-only data (e.g., dashboards, alerts)
SSE only supports one-way communication (server ➝ client), may be unreliable behind some proxies, and is sensitive to mobile networks. For high-load or bidirectional applications, WebSocket or another technology is recommended.
Select Language
Set theme
© 2025 ReadyTools. All rights reserved.