This probably won't work if you have gzip on, right?
<?
echo 'Hey<br>';
flush();
ob_flush();
sleep(20);
echo 'Bye';
?>
Will send you "Hey<br>Bye" after 20sec instead of what you would expect (which does work with gzip off).Besides, even if you manage to stream it, I imagine inflating partially received content is not trivial for the browser.
Firefox's xhr fires progress events for gzipped content but not Chrome's. Looking to see if I can find a way round it.
Here's the little test service I wrote to stream out some gzipped content:
https://github.com/jimhigson/oboe.js/blob/master/test/stream...