server-sent events

From IndieWeb
Jump to: navigation, search

server-sent events is a DOM API for receiving push notifications from a server via HTTP. Unlike websockets, they're designed for one-way communication between a Web server and a client (Web browser, another Web server or a client application).


Server-sent events are one way to implement real-time comments display on your posts.


How does one implement server-sent events, especially in combination with a comment updating system?

(stub, to be filled in)

server side

One option is using the nginx-push-stream module for nginx. This is e.g. used on

IndieWeb Examples

The IRC logs use server-sent events to push new IRC messages to the browser in real time.

Aaron Parecki uses server-sent events to push new posts onto his home page in realtime.


sweetroll uses server-sent events to show in realtime that the current page has been updated.


Not Supported in IE

While fairly widely supported, server-sent events are currently not supported in IE.

  • MDN lists some polyfill libraries that cover IE and older browsers.

See Also