To use Server-Sent Events in a web application, you would need to add an <eventsource> element to the document.
The src attribute of the <eventsource> element should point to an URL that should provide a persistent HTTP connection that sends a data stream containing the events.
The URL would point to a PHP, PERL or any Python script that would take care of sending event data consistently.
Here is an example showing application that would expect server time.
<!DOCTYPE HTML> <html> <head> <script> /* Define event handling logic here */ </script> </head> <body> <div id = "sse"> <eventsource src = "/cgi-bin/ticker.cgi" /> </div> <div id = "ticker"> <TIME> </div> </body> </html>