Monday, July 22, 2013

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

With a site hosted in IIS I was getting this warning:

Resource interpreted as Font but transferred with MIME type application/octet-stream: "http://localhost/Website/assets/webfonts/mplus-1c-light-webfont.ttf". index.html:6
Resource interpreted as Font but transferred with MIME type application/octet-stream: "http://localhost/Website/assets/webfonts/mplus-1c-regular-webfont.ttf". index.html:6

The solution is:

1. Open IIS manager
2. Go to MIME types
3. Click on "add..."
4. Fill the fields:
   - File name extension: .woff
   - MIME Type: application/x-font-woff
5. Restart IIS.

References:
http://stackoverflow.com/questions/15521130/google-warning-resource-interpreted-as-font-but-transferred-with-mime-type-appl
http://stackoverflow.com/questions/3594823/mime-type-for-woff-fonts

No comments: