I am looking for ways in which my website can be automatically compressed to improve on load times. I have gzip enabled on my server and also within my .htaccess file, it very easy to turn on, but I don't quite understand how it actually speeds up my website. I am looking for ways in which to compress my .css and .js files to be one line, compressed, to show no white space, and to be automated on the fly. In other words, when I open the css and js files via FTP I would still like to see them laid out with the proper formatting but when I save the files I would like it to be compressed automatically. I am using Coda 2 for Mac as my web editor if that matters at all?
Also, in terms of site images - are there any ways in which the server can automatically compress them for me too? Let's say all of my images are in the /img folder, can I point the server to compress them whenever a new image is uploaded? It will need to be a lossless compression in order to retain the quality but still have the lowest file size. Will I need to use software in order to do this or can lossless image compression for .jpg, .png and .gif files be automated the same way .css and .js compression is automated?
On a side note: I am using DD_belatedPNG fix for all of the IE6 image transparencies. I have tried all of the other IE6 transparency fixes, but this one seems to work the best. (No image flicker, works instantly, no problems with background images too). The only downside is that I have to manually update which classes I wish to apply the transparency fixes on. Does anybody know if there is a way to automate the DD_belatedPNG fix for IE6 too? For example, I only use .png files if transparency is needed (otherwise I use .jpg for photos, and .gif for small icons), so if a .png is used in the css file, can it tell DD_belatedPNG to automatically add the class fix?
I know that this kind of turned into a few questions here.. Automation is what I am really after. If I can get these figured out I believe there will be a lot less headache and maintenance work in the long run.