Home » » ob_flush

ob_flush

Written By 1 on Sunday, September 30, 2012 | 7:06 PM

void ob_flush ( void )

Flush (send) the output buffer

This function will send the contents of the output buffer (if any). If you want to further process the buffer's contents you have to call ob_get_contents() before ob_flush() as the buffer contents are discarded after ob_flush() is called.


As of August 2012, all browsers seem to show an all-or-nothing approach to buffering. In other words, while php is operating, no content can be shown.



In particular this means that the following workarounds listed further down here are ineffective:



1) ob_flush (),  flush () in any combination with other output buffering functions;



2) changes to php.ini involving setting output_buffer and/or zlib.output_compression to 0 or Off;



3) setting Apache variables such as "no-gzip" either through apache_setenv () or through entries in .htaccess.



So, until browsers begin to show buffered content again, the tips listed here are moot.


Google I/O 2009 - Even Faster Websites

0 Comment:

Post a Comment