Sivakatirswami
asked on
How Do We Tell Apache to Gzip Font Files?
I want to enter the correct parameters to the httpd.conf file to get Apache to gzip webfonts.
I already have this in the root httpd.conf for all domains on the box. But webfonts have no established mime-type (that I know of... as of Feb 2011) so how do you tell Apache to gzip all
*.eot *.otf *ttf *.woff *.svg web font files before filling the GET request?
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/x-httpd-php
I already have this in the root httpd.conf for all domains on the box. But webfonts have no established mime-type (that I know of... as of Feb 2011) so how do you tell Apache to gzip all
*.eot *.otf *ttf *.woff *.svg web font files before filling the GET request?
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript application/x-httpd-php
ASKER
OK... do you just add these lines like you have them above to httpd.conf, one line per file type?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Outstanding, Sorry for delay in responding... very busy here, but this is great thanks!
No problem, enjoy :)
mod_gzip_item_include file \.eot$
mod_gzip_item_include file \.otf$
mod_gzip_item_include file \.ttf$
mod_gzip_item_include file \.woff$
mod_gzip_item_include file \.svg$
BTW, there are mime types for a couple of these already, but seems like more work to do it that way (application/vnd.ms-fontob