Forum for discussing general topics related to Couch.
4 posts Page 1 of 1
hello Couch ... re this post http://www.couchcms.com/forum/viewtopic.php?f=4&t=7661&p=13592&hilit=gzip#p13592 on compression of text files - a couple of questions to throw out there -

Is this something that should be done routinely for all sites?
Does it make a big difference to speed?
Are there any drawbacks?

Your thoughts appreciated!
@potato,

Having read your question and the thread referred to, I gave compression a try on one of my own websites. I used the .htaccess method suggested by @VividWeb because it was easy and has the advantage of compressing other file types besides just php.

Using the recommended testing tools, I found a compression rate of between about 60% to 90%. That seems pretty good, especially considering it only costs a one-time addition to my htaccess file, so why not?

Of course they are just text files being compressed, so they’re not all that big to begin with. One largish page was compressed from 44kb to 13kb. So it saved about the equivalent of a moderate-sized image. A much smaller page saved about 4kb with compression. My CSS file saved about 3kb.

So you can do the math and decide for yourself. It’s maybe not as big a deal as, say, optimizing images, but every bit helps and it all adds up. Having tried it, I'm not feeling inclined to remove it.

Thanks for the tip.
Tim
It is considered a best practice to enable compression @potato; I do this on all my sites.

Compressing data is a trade-off between CPU and bandwidth. There is additional work involved in compression (for the server) and decompression (for the client). This should be miniscule though and pale in comparison to the benefit of having to transfer 50%+ less data. This should also be a boost for mobile connections.
thanks @tim and @cheesypoof - I realise it's a no-brainer isn't it? I tried the .htaccess method and it didn't work. The webhost for the site is 1and1 - the php.ini method as suggested by KK worked and the home page is reduced from 34,339 - 6,672 ;)

I've learnt a LOT from this forum - thanks guys!
4 posts Page 1 of 1