What is HTML5 Server-Sent Events
In this article I have described the Server-Sent Events in HTML5
Server Sent Events are supported by the following browsers.
|Fire fox v6..
Note: Browser Earlier versions, do not support Server-Sent Events.
Example of Server-Sent Events
document.getElementsByTagName("eventsource").addEventListener("server-time", eventHandler, false);
document.querySelector('#ticker').innerHTML = event.data;
<div id="ticker" name="ticker">
The EventSource Object
onopen : When a request connection to the server is opened
onmessage : When a request message is received
onerror : When an error occurs
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here