🎁 New User? Get 20% off your first purchase with code NEWUSER20 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

Progressive Enhancement
A web design strategy that starts with basic functionality for all browsers and progressively adds advanced features for capable ones.
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.
CSS Flexbox
A CSS layout model that provides efficient arrangement of items within a container, handling alignment, distribution, and spacing.
PHP
A widely-used server-side scripting language designed for web development that powers over 75% of websites including WordPress.
HTTP Status Codes
Standardized three-digit codes returned by web servers to indicate the result of a client's HTTP request.
View All Web Development Terms →