HTML5 Server Sent Events

Here you will learn about Server Sent Events which used when you need to be displayed data immediately to the end user without refreshing the web page.

When you need to display real-time data (Latest update from server) on web page, but without refreshing the page you need to use Server Sent Events. As, to get the latest update from server we need to refresh the browser, but somewhere like Facebook/Twitter updates, stock price updates, etc websites you also might be need to display latest real-time data on the web page. Server-Sent Events are supported in all major browsers, except Internet Explorer.

First thing you have to do is to create EventSource object and give it a URL to listen which is must needed In order to listen to an event in the client-side. EventSource is a reference to a server side source that dispatches the events (the generic handler in this case).

Thanks
  

Ebook Download
View all
Learn
View all