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:

1
2
3
4
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.

Comments