【问题标题】:.woff2 failed to load in chrome.woff2 无法在 chrome 中加载
【发布时间】:2015-12-04 08:03:27
【问题描述】:

.woff 文件出现 404 错误。即使我按照Proper MIME type for .woff2 fonts 中的说明将 .woff 添加到 IIS 中的 MIME 类型,我仍然收到 404 错误。它适用于 IE,但不适用于 chrome。任何指针?我无法将以下内容添加到 web.config。

 <system.web>
    ...
    <staticContent>
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
    </staticContent>
  </system.web>

任何指针将不胜感激。

【问题讨论】:

  • 我们在看什么?因为 XML 绝对不是 HTML、CSS 和/或 JS。

标签: google-chrome iis fonts woff2


【解决方案1】:

我认为这可能与 IIS 有关。我的公司仍在使用 IIS 7.5。因此它不支持 woff2。

因为 IIS 或 web.config 更改都不能解决问题。我决定使用cdn,例如https://www.google.com/fonts#UsePlace:use/Collection:Roboto。它有关于如何在那里使用字体的说明。

【讨论】:

    【解决方案2】:

    试试这个:

    mimeType="font/woff2" 
    

    【讨论】:

      猜你喜欢
      • 2020-12-31
      • 2018-12-19
      • 2017-12-20
      • 2021-09-10
      • 1970-01-01
      • 2018-01-10
      • 1970-01-01
      • 2012-12-22
      • 2012-05-23
      相关资源
      最近更新 更多