IE6 does not behave good with gzip compression

Hello folks,
I have an IE specific trouble while using gzip compression.
All other browsers are working well. And, I need your advice in patching this script for IE.


$zlib_output_compression = ini_get('zlib.output_compression');
$zlib_output_handler = ini_get('zlib.output_handler');
if(in_array(strtoupper($zlib_output_compression), array('ON', '1', 'TRUE')) && $zlib_output_handler!='')
{
	# Compression is defined already.
	# Just begin the buffer.
	ob_start();
}
else
{
	ob_start('ob_gzhandler');
}

In IE, I will have to open the page twice, by pressing F5. Only then, the page contents show up. Otherwise (in the first attempt), the page gives a blank output.

Expecting your helps.

You must tell the browser you are about to send compressed output by sending the correct headers. IE 6 isn’t alone in requiring this, there are other browsers which will have trouble. Newer browsers will try (often successfully) to figure out which compression schema you are using in the absence of headers, but they aren’t supposed to have to do that.

Thanks Michael.
There is an improvement. Only the 404 page have errors now - probably solvable.


header('Content-Encoding: gzip');

Simple fix.