google / fonts

Font files available from Google Fonts, and a public issue tracker for all things Google Fonts
https://fonts.google.com
18.24k stars 2.62k forks source link

Compress and minify #2060

Open mcandre opened 5 years ago

mcandre commented 5 years ago

Please gzip compress (for HTTP clients that accept it), and minify HTTP responses, such as for https://fonts.googleapis.com/css?family=... responses, so that we can reduce bandwidth and load pages faster.

Examples:

thanhnhan2tn commented 4 years ago

+1 Please also provide minify version to optimize PageSpeed I found 1 closed issue here but quite old, now google lighthouse ask me to minify that CSS files

KTibow commented 4 years ago

Well I think Google Lighthouse does separate checks for compression and minification. And it does send a

content-encoding: gzip

header. But that's right, it asks me too.
How about replacing the space indents with a single tab, and removing the spaces (at the start/end of the comments and turning things like font-style: normal; into font-style:normal;)? That keeps it readable and small.