HTML5 Server-Sent Events working

JavascriptWeb DevelopmentFront End Scripts

Conventional web applications generate events that are dispatched to the web server. For example, a simple click on a link requests a new page from the server.

The type of events that are flowing from web browser to the web server may be called client-sent events.

Along with HTML5, WHATWG Web Applications 1.0 introduces events that flow from the web server to the web browsers and they are called Server-Sent Events (SSE). Using SSE you can push DOM events continuously from your web server to the visitor's browser.

The event streaming approach opens a persistent connection to the server, sending data to the client when new information is available, eliminating the need for continuous polling.

Server-sent events standardize how we stream data from the server to the client.

raja
Updated on 30-Jul-2019 22:30:22

Advertisements