Wednesday, December 26, 2012

Published 10:14 PM by with 0 comment

HTML5 Server-Sent Events

What is the Web workers
 
A server-sent event is when a web page automatically gets updates from a server.
This was also possible before, but the web page would have to ask if any updates were available. With server-sent events, the updates come automatically.
Examples: Facebook/Twitter updates, stock price updates, news feeds, sport results, etc.


Internet ExplorerFirefoxOperaSafariGoogle Chrome ΙΕ not Support.
var source=new EventSource("sample.php");
source.onmessage=function(event)
  {
  document.getElementById("result").innerHTML+=event.data + "
"; };
    email this       edit

0 comments: