...

View Full Version : gzip compression - best practices??



Captain_Goggles
06-07-2009, 03:53 PM
So I had been reading up on gzip compression on this Google Page Speed (http://code.google.com/speed/page-speed/docs/payload.html#GzipCompression) page, and I came across some stuff I had never heard/thought about.

They recommend that, to "make compression most effective", you should:


Specify CSS key-value pairs in the same order where possible, i.e. alphabetize them.
Specify HTML attributes in the same order , i.e. alphabetize them. Put href first for links (since it is most common), then alphabetize the rest. For example, on Google's search results page, when HTML attributes were alphabetized, a 1.5% reduction in the size of the gzipped output resulted.
Use consistent casing, i.e. use lowercase wherever possible.
Use consistent quoting for HTML tag attributes, i.e. always single quote, always double quote, or no quoting at all where possible.

Can anyone confirm the validity of these suggestions?

I saw that w3 used to have something similar in their Mobile Web Application Best Practices (http://www.w3.org/TR/2009/WD-mwabp-20090507/diff.html#bp-conserve-compress) (see section 3.4.1.3), but that it was edited out in the newer revision.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum