It helps if you get sleep :) The solution was to disable buffering but since I use php-fpm
with apache mod_proxy_fcgi
I cannot disable output buffering script wise (maybe I am wrong here?).
So one solution is for apache conf is here: stackoverflow link
Flush packets every 10ms.
# max=10 = 10ms
<Proxy "fcgi://localhost/" enablereuse=on flushpackets=on max=10>
</Proxy>
I don't know the implications of that. But for SSE it works.
So maybe a better solution is here
echo 'SetEnv no-gzip 1' > .htaccess
It seems that those in .php
script are useless
@ini_set('zlib.output_compression', 0);
@ini_set('output_buffering', 'off');
because they run AFTER apache?
Now it works with HTTP/2 and HTTP/1.
Thanks @hybrid for the inspiration.