August 9, 2012

Setting font MIME types in apache

If your website is using custom fonts, you may see this line in your Chrome console:

Resource interpreted as Font but transferred with MIME type application/octet-stream

This is really kinda annoying, if you want to get rid of that warning then add the following directives to your apache conf/.htaccess:

AddType application/vnd.ms-fontobject eot
AddType font/opentype otf
AddType font/truetype ttf
AddType application/x-font-woff .woff

See here for more information.

© Michael Sharman 2017