Apache 2.2.17 PHP 5.3.3
Presently, my application does not use gzip, however i wish it to. However, I am unsure of the couple of things:
- I understand that IE6 has issues with it you don't need to retrace individuals here.
- What benefits/disadvantages exist to applying this in Apache (mod_deflate) versus PHP? Will they essentially produce exactly the same result? I suppose Apache could be more effective, is a proper assumption?
- The application creates a number of kinds of reactions: pdf, xml, zip, xls, csv, images (see next point), not to mention the standard AJAX-type stuff.
- I have seen that lots of good examples not gzip images, how can this be? Could it be because of the assumption that many images happen to be inside a compressed format, or is there related to it being binary data? I actually do create some images dynamically, and serve others statically.
- I additionally stream audio recordings (wav, mp3) using a PHP mechanism any gotchas here?
Basically, if you have implemented gzip on the mature site, and encounter problems, I'd love to be aware what individuals were, and that which you did to operate-around these complaints. Thanks!
Little else to become stated
Get it done in Apache, you can easily setup as well as no switch to your code. You may also arrange it easily to compress css and js files if you would like.
Apache could be set to compress only specific file types
Blending a previously compressed file will more often than not create a bigger file. For those who have uncompressed images, like bmps, you're going to get better results utilizing a compression technique specific to images than using gzip, which means you are best just transforming these to presen, png, digital based on your requirements.
I don't know about streaming, but just like images is applicable to audio. If it's already compressed, don't compress it again, and when it's not, make use of a compression technique specific towards the type.
Essentially, gzip is ideal for blending text files and so i would set Apache to compress individuals. For other things, you will find better solutions if you want it.
Apart from bmp's (if you notice someone with them within the wire, ready your shotgun), images are mainly already compressed, including jpeg's, png's and gif's.
I personally use this during my static subdomains, put together from some online assets (that exist easily Searching):
The only real special factor I have added is the fact that I cache *.cache.js and *.cache.css files for six several weeks, given that they rarely change. E.g. jqueryui.cache.css