IE 11 fails to load resource files

 ̄綄美尐妖づ 提交于 2019-12-05 08:24:47
animesh manglik

I have been seeing similar issue with the CDN. Am going to update the answer if I find any other solution. IE has an issue if your font files have no cache set.

I hope this link helps.

On IE CSS font-face works only when navigating through inner links

Update : The issue fixed for me after setting the correct cache control in .htaccess file

I made mine for max-age= 3600 but max-age=0 would work too

<FilesMatch "\.(ttf|otf|eot|woff)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
Header set Cache-Control "max-age=3600"
</IfModule>
</FilesMatch>

MIME types are very important in IE11. You must ensure that the proper MIME types are sent for font files:

  • application/vnd.ms-fontobject for EOT fonts
  • application/font-woff for WOFF fonts

What CDN are you using? With the official FontAwesome CDN (http://www.bootstrapcdn.com/#fontawesome_tab), everything should work fine.

For anyone else finding this with the same issue, the following is info, not necessarily a solution.

IE apparently has a bug titled:

@font-face not working with Internet Explorer and HTTP-Header Pragma=no-cache

They have closed the bug as Won't Fix.

View details here: http://connect.microsoft.com/IE/feedbackdetail/view/992569/font-face-not-working-with-internet-explorer-and-http-header-pragma-no-cache

I noticed the same issue immediately after adding a few headers to prevent caching, including the pragma header.

So I don't have a good explanantion for why this is failing, but the solution that the one that works, not the one that is ideal. You can burn a good deal of time trying to troubleshoot this and still not get anywhere, there are a ton of variables involved.

Can you set the font fallback to hit your server as opposed to the cdn?

You should be able to specify it in the css that you use one font face, and then another if it fails.

   body { font-family:"FontAwesome", "FontAwesomeFallback"; }

Make the FontAwesomeFallback point to your local directory and see if IE11 has the same issue. If it's a CDN issue, hitting your local directories shouldn't be an issue and the font will render properly. If it still fails, it may be an issue with the fontface itself.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!