🎁 New User? Get 20% off your first purchase with code NEWUSER20 Register Now →
Menu

Categories

Web Development Intermediate

What is Server-Sent Events (SSE)?

A web technology enabling servers to push real-time updates to browsers over a single HTTP connection, simpler than WebSockets.

Server-Sent Events provide a standard way for servers to push data to clients over HTTP. Unlike WebSockets (bidirectional), SSE is unidirectional (server to client) but simpler to implement, works over standard HTTP, and automatically reconnects on disconnection. The server sends text/event-stream responses with data, event type, retry interval, and optional IDs for resumption. Use cases include live notifications, stock tickers, social media feeds, and progress updates. SSE works through proxies and load balancers without special configuration. The EventSource JavaScript API provides a clean interface. For bidirectional communication, WebSockets remain the better choice.

Related Terms

Service Worker
A JavaScript file that runs in the background, enabling offline support, push notifications, and background sync for web apps.
Responsive Design
A web design approach that makes web pages render well on all screen sizes using flexible layouts and media queries.
HTTP/3
The latest HTTP version that uses QUIC instead of TCP, providing faster connections and better performance on unreliable networks.
Cookie
A small piece of data stored in the browser by a website to remember user preferences, login state, or tracking information.
Web Performance Optimization
Techniques to make websites load faster and respond more quickly, improving user experience and search engine rankings.
API Rate Limiting
A strategy for limiting the number of API requests a client can make within a specified time window to protect server resources.
View All Web Development Terms →