๐ŸŽ New User? Get 20% off your first purchase with code NEWUSER20 ยท โšก Instant download ยท ๐Ÿ”’ Secure checkout Register Now โ†’
Menu

Categories

Web Development Intermediate

What is Server-Sent Events?

A server push technology that enables a server to send real-time updates to a browser over a single HTTP connection.

SSE provides a simple, unidirectional channel from server to client. The server sends events as text/event-stream content type. The browser uses EventSource API: const source = new EventSource('/events'); source.onmessage = e => console.log(e.data).

SSE is simpler than WebSockets for one-way communication (notifications, live feeds, stock tickers). It supports automatic reconnection, event IDs for resume, and named events. SSE uses standard HTTP, working through firewalls and proxies without special configuration.

Related Terms

HATEOAS
Hypermedia As The Engine Of Application State โ€” a REST constraint where API responses include links to related actions and resources.
Web Performance Optimization
Techniques to make websites load faster and respond more quickly, improving user experience and search engine rankings.
Lazy Loading
A technique that delays loading non-critical resources until they are needed, improving initial page load performance.
WebSocket
A communication protocol that enables full-duplex, real-time data exchange between a browser and server over a single connection.
GraphQL
A query language for APIs that lets clients request exactly the data they need, reducing over-fetching and under-fetching.
Middleware
Software that sits between the request and response in a web application, performing processing like authentication or logging.
View All Web Development Terms โ†’