Hi, in the root directory of my webapp, the .htaccess file contains the following line:
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css application/x-javascript text/javascript
This means that all my pages are gzipped, and it's ok.
In some pages I need to make the browser close the connection before the script ends (I need some time consuming postprocessing). To do so I do:
ignore_user_abort(true);
set_time_limit(0);
$str = ob_get_contents();
ob_end_clean();
header("Content-Length: ".strlen($str));
header('Connection: close');
Without compression it works, with the gzip compression enabled not: the browser renders the page but the loading wheel still runs.
The question is: is there a way (f.e. with ini_set()) to disable the gzip compression ONLY for some pages, from inside the php code?