web servers usually buffer output til some conditions are met (buffer is full, or end of data to send). there is no way around to bypass it except using http headers. one of them is sending data as chunked using transfer-encoding: chunked