edgarfleming / googlefontdirectory

Automatically exported from code.google.com/p/googlefontdirectory
0 stars 0 forks source link

Enable gzip compression on the CSS file #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The CSS file provided by the static call to the webfonts (ie using a <style> 
tag) doesn't serve a gzipped file.
According to Page Speed and Chrome's Audit tab, it would save roughly 50% of 
bandwidth.

Please implement this to make the web faster!

Original issue reported on code.google.com by edo999 on 19 Jul 2010 at 3:19

GoogleCodeExporter commented 9 years ago
Actually, this was a conscious decision on our part. In general, gzip 
compression can save bandwidth, but generally for larger payloads, and the CSS 
is generally in the range of 200 bytes. According to the recommendations on the 
Page Speed documentation:

http://code.google.com/speed/page-speed/docs/payload.html

Note that gzipping is only beneficial for larger resources. Due to the overhead 
and latency of compression and decompression, you should only gzip files above 
a certain size threshold; we recommend a minimum range between 150 and 1000 
bytes. Gzipping files below 150 bytes can actually make them larger.

We have set our threshold at 500 bytes, so generally any CSS request for 3 or 
more fonts will trigger the gzip compression.

Thanks for your interest!

Original comment by raph.lev...@gmail.com on 20 Jul 2010 at 4:31