Reputation: 403
I am really trying to get up to speed with website optimization as most off my websites really lack in speed. I am using http://gtmetrix.com/ to test my website speed.
One thing I really need to do is use gzip compression. I spent ages trying to get it to work and could not figure out where i was going wrong.
If I click more information in web developer toolbar it said gzip enabled so this was decieving as it isn’t. I contacted my hosting providers and got the following response:
Unfortunately not, Gzip would cause too much load on our hosted servers therefore any similar programs would cause the same strain.
So even when it says it is enabled, I think I am right in saying what you need to check for in the php.ini file is:
zlib.output_compression Off Off
zlib.output_compression_level -1 -1
zlib.output_handler no value no value
Ok, so I assume this needs to be set to on to allow gzip compression. Is this correct?
Basically I would have to go for a dedicated server to allow for gzip £70 a month.
So I guess what I am asking is: Is there a way using PHP to utillise gzip compression without it being enabled by the hosting provider? I have tried many option but none successful so far.
Thanks
Upvotes: 2
Views: 1016
Reputation: 145482
gzip/deflate adds no significant load. Those rip-off prices aren't worth it however.
As for PHP, it can also be enabled from within scripts:
ob_start("ob_gzhandler");
Would be emulatable via gzencode() if not available; but too much overhead I'd assume..
Upvotes: 1