Resource interpreted as Font but transferred with MIME type application/x-font-woff

后端 未结 2 1169
不思量自难忘°
不思量自难忘° 2020-12-12 14:54

I followed the Web Fonts tutorial in qooxdoo documentation to add a web font to Font.js , but I notice there is a warning in Chrome\'s Developer Console:

My code is

相关标签:
2条回答
  • 2020-12-12 15:25

    If you are using an IIS webserver, give this a try:

    <system.webServer>
      <staticContent>
        <remove fileExtension=".woff" /> 
        <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      </staticContent>
    </system.webServer>
    
    0 讨论(0)
  • 2020-12-12 15:32

    According to the W3C spec, the correct MIME type is application/font-woff, so you need to configure your web server to use that when serving .woff files.

    0 讨论(0)
提交回复
热议问题