Has anyone been able to get server-sent events to work. Using the Webkit (Chromium) engine I am able to get the php to post, however, it has to finnish and flush does not work. If I change to Trident engine it fails eventhough I have IE9 installed.
Any comments or direction is appreciated.
/Hakan
My server side is simply:
<?php header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); while (@$i++ < 10){ echo "data: foo|".time()."|more data |"."\n\n".PHP_EOL; @ob_flush(); flush(); // this alarms thus the @ sleep(1); } ?>
and my client side is:
JUST A SECOND, UPDATING DATA
Any comments or direction is appreciated.
/Hakan
My server side is simply:
<?php header('Content-Type: text/event-stream'); header('Cache-Control: no-cache'); while (@$i++ < 10){ echo "data: foo|".time()."|more data |"."\n\n".PHP_EOL; @ob_flush(); flush(); // this alarms thus the @ sleep(1); } ?>
and my client side is:
JUST A SECOND, UPDATING DATA
Last edited: