What mime type should WOFF fonts be served as?
I am serving truetype (ttf) fonts as font/truetype
and opentype (otf) as font/opentype
, but I cannot find the correct format for WOFF fonts.
I have tried font/woff
, font/webopen
, and font/webopentype
, but Chrome still complains:
"Resource interpreted as font but transferred with MIME type application/octet-stream."
Anybody know?
I have had the same problem, font/opentype worked for me
It will be
application/font-woff
.see http://www.w3.org/TR/WOFF/#appendix-b (W3C Candidate Recommendation 04 August 2011)
and http://www.w3.org/2002/06/registering-mediatype.html
From Mozilla css font-face notes
source: https://developer.mozilla.org/en/CSS/@font-face#Notes
Update from Keith Shaw's comment on Jun 22, 2017:
In January 2011 it was announced that in the meantime Chromium will recognize
application/x-font-woff
as the mime-type for WOFF. I know this change is now in Chrome beta and if not in stable yet, it shouldn't be too far away.
Add the following to your .htaccess
good luck
Maybe this will help someone. I saw that on IIS 7
.ttf
is already a known mime-type. It's configured as:So I just added that for all the CSS font types (
.oet
,.svg
,.ttf
,.woff
) and IIS started serving them. Chrome dev tools also do not complain about re-interpreting the type.Cheers, Michael