Server-sent events
Widely available since 2022-07-15
The EventSource
API creates a connection to a server and listens to a stream of events sent by the server.
Learning resources on MDN
- EventSource
- EventSource: EventSource() constructor
- EventSource: close() method
- EventSource: error event
- EventSource: message event
- EventSource: open event
- EventSource: readyState property
- EventSource: url property
- EventSource: withCredentials property
Browser support (view on caniuse.com)
- Chrome 6 Released on 2010-09-02
- Chrome Android 18 Released on 2012-06-27
- Edge 79 Released on 2020-01-15
- Firefox 6 Released on 2011-08-16
- Firefox for Android 45 Released on 2016-03-08
- Safari 5 Released on 2010-06-07
- Safari on iOS 5 Released on 2011-10-12
Specifications
- HTML Standard (#server-sent-events), from HTML Workstream (WHATWG).