Fantastic performance tip on hosting compressed CSS and javascipt file from Amazon S3:
After that, I launch Terminal and run `gzip -9 filename.css && gzip -9 filename.js` to compress them as tightly as possible. This will give me filename.css.gz and filename.js.gz. I remove the .gz extension, and upload those files to S3.
Lastly, I add a custom HTTP header — `Content-Encoding: gzip` — to each of the files in S3. This tells the browser the same thing as Apache would if it were compressing them on the fly. The browser then knows to decompress the content after downloading it.
Since the files are pre-compressed instead of compressing on the fly (a la Apache), fewer server resources are used and the response times are faster. "
Original source: http://developer.amazonwebservices.com/connect/thread.jspa?messageID=194918&tstart=0#194918
3 months ago