Server sent events work, but with a massive time delay
问题 Ill start off by saying this works perfectly on my local machine, the js example below connects to stream.php and receives a continuous update of the servers current time every second. index.php var source = new EventSource("stream.php"); source.addEventListener('message', function(e) { console.log(e); }, false); source.addEventListener('open', function(e) { console.log(e); }, false); source.addEventListener('error', function(e) { if (e.readyState == EventSource.CLOSED) { console.log('closed'