🎁 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

CORS Preflight
An automatic OPTIONS request sent by browsers before certain cross-origin requests to check if the actual request is permitted.
Brotli Compression
A modern compression algorithm developed by Google that achieves better compression ratios than Gzip for web content delivery.
Web Performance Optimization
Techniques to make websites load faster and respond more quickly, improving user experience and search engine rankings.
CSS Grid
A two-dimensional CSS layout system for creating complex grid-based designs with rows and columns.
Server-Sent Events (SSE)
A web technology enabling servers to push real-time updates to browsers over a single HTTP connection, simpler than WebSockets.
PHP
A widely-used server-side scripting language designed for web development that powers over 75% of websites including WordPress.
View All Web Development Terms →