As far as I understand, the server side of the PHP script periodically sends a message. In the example, the link to the script is in the tag named event-source
, and the script is events.php
. Message onMessageHandler
handled by the onMessageHandler
function. The handler is assigned to the <event-source>
-tag itself; for the Opera a server-time
event, the Webkit a message
event is processed. It (a browser with HTML5 support), which takes care of the survey, so in fact it is most similar to the browser implementation of a long survey .
As for your question, I donβt understand who / what generates events on the server: there are no events on the server side, this is just a PHP script called from time to time. In the example, when the script returns a timestamp.
source share