Why is mod_deflate not supported by my hosting company?

I just did some tests with YSlow and he told me:

Grade F on Compression Components with gzip: There are 10 simple text components that need to be sent compressed

I know that Apache 1.3 uses mod_gzip , while Apache 2.x uses mod_deflate , so the easiest solution is to use mod_deflate on an Apache 2 server.

However, I checked two public hosting companies and one local company, and they all told me that they do not support mod_deflate .

I know that some older browsers cannot accept gzipped / deblated content, and I do not suggest that it be turned on by default, but are there any negatives to make mod_deflate available? Is this just an extra load on server processors?

Also, are there any alternatives? I saw that if you use a CMS, such as Wordpress, you can install a cache plugin that will serve cached versions of pages originally created through PHP.

+4
source share
1 answer

Compression takes up processor time. Perhaps the hosting company decided that they care more about the CPU than about network traffic. Perhaps they offer it with a more expensive package. Perhaps they just did not add it. Only your hosting company will know.

When using PHP, you can check if PHP support is enabled in zlib. If so, you can use ob_start("ob_gzhandler"); in your code to include an output buffer that will compress your data or set zlib.output_compression in your php configuration, for example, using php_flag zlib.outout_compression on in your .htaccess file.

http://php.net/ob_gzhandler

http://php.net/zlib.output-compression

+3
source

All Articles