Compress SVG and common font files by default. #877

Merged
merged 1 commit into from Aug 26, 2013

Conversation

Projects
None yet
2 participants
Contributor

Fishrock123 commented Aug 26, 2013

Sets the default compression filter to also include svg, ttf, otf, and
eot files, as these are commonly used and can be compressed.

SVG is entirely text (xml), and these three font formats are also primarily text, and nicely compressible.
WOFF files are already compressed and don't need to be included.

I began looking into this when google's pagespeed insights analyzer was telling me to gzip my svg logos even when I already had express.compress() correctly turned on.

Turns out tests have been done on this in the past and all of these file types can be compressed with an average of over 40% savings. (With some svg's seeing much higher savings.) (http://www.phpied.com/gzip-your-font-face-files/)

If the pull is acceptable, let me know and I'll sign the CLA.

@Fishrock123 Fishrock123 Compress SVG and common font files by default.
Sets the default compression filter to also include svg, ttf, otf, and
eot files, as these are commonly used and can be compressed.
418e8f9

tj merged commit 88c5a53 into senchalabs:master Aug 26, 2013

1 check passed

default The Travis CI build passed
Details
Member

tj commented Aug 26, 2013

thanks!

Contributor

Fishrock123 commented Aug 28, 2013

Just a note, http://www.senchalabs.org/connect/compress.html should probably be updated to show this at some point.

Fishrock123 referenced this pull request in jshttp/compressible Aug 7, 2014

Closed

Patterns vs specification #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment