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

前端 未结 7 1861
时光取名叫无心
时光取名叫无心 2020-11-29 00:20

I have a warning in Google for my font-face:

Resource interpreted as Font but transferred with MIME type application/octet-stream: \".../Content/Fonts/iconFo

7条回答
  •  臣服心动
    2020-11-29 01:05

    You need to add the following types to an .htaccess/IIS:

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

    Updated .woff type from:

    AddType application/x-font-woff .woff
    

    (Thanks to @renadeen in comments below for pointing this out.)

    Check out my answer to a similar question here: Font Face not loaded

    Taken from here: font-face problem in chrome.

提交回复
热议问题