0

In my php project I'm using

ob_start('gz_handler');

at the start of every page.

But when it comes to downloading zip files I'm getting problems with some browsers. So I need to deactivate it just there.

So what's the opposite of ob_start('gz_handler')? What can I do to not having the output compressed?

C. S.
  • 127
  • 1
  • 2
  • 8

1 Answers1

0

if you are using apache for example the best way would be to do it in your .htaccess file for the file types that should be compressed.

for example you could put this in your htaccess file:

<FilesMatch "\.(php|html|js|css?)$">
    php_flag zlib.output_compression On
</FilesMatch>
DiverseAndRemote.com
  • 19,314
  • 10
  • 61
  • 70