@ font-face EOT无法通过HTTPS加载 [英] @font-face EOT not loading over HTTPS

查看:222
本文介绍了@ font-face EOT无法通过HTTPS加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题使用@ font-face通过HTTPS在IE 7,8,9 - 它只是没有加载。无论包含的HTML网页是否托管在HTTPS上,当我尝试通过HTTP加载EOT字体时,它不起作用,HTTPS不会。有没有人看到这种行为?

I'm running into an issue using @font-face over HTTPS in IE 7,8,9 - it simply is not loading. It does not matter whether the containing HTML page is hosted on HTTPS or not, when I try to load the EOT font over HTTP it works, HTTPS it doesn't. Has anyone seen this behavior?

托管字体的服务器正在发送正确的content-type =application / vnd.ms-fontobject

The server hosting the font is sending the proper content-type="application/vnd.ms-fontobject"

我试过多种字体,所以它不是特定于字体。

I've tried multiple fonts, so it's not specific to the font.

字体是通过 Font Squirrel

@font-face {
font-family: 'GothamCondensedBold';
src:url('path/to/fontgothmbcd-webfont.eot');
src:url('path/to/fontgothmbcd-webfont.eot?#iefix') format('embedded-opentype'),
    url('path/to/fontgothmbcd-webfont.woff') format('woff'),
    url('path/to/fontgothmbcd-webfont.ttf') format('truetype'),
    url('path/to/fontgothmbcd-webfont.svg#GothamCondensedBold') format('svg');
font-weight: normal;
font-style: normal;
}



示例页



http://gregnettles.net/dev/font-face-test.html

推荐答案

我知道这是一个老线程,但我只是要加权。我们有同样的问题EOT和WOFF字体在所有版本Internet Explorer(7-11)不能通过HTTPS加载。经过几个小时的试验和错误,并将我们的标题与其他工作网站比较,我们发现是 vary 标题,是搞砸了。取消设置这些文件类型的标题会立即修复我们的问题。

I know this is an old thread but I just had to weigh in. We had the same issue with EOT and WOFF fonts in all versions of Internet Explorer (7-11) not loading over HTTPS. After hours of trial and error and comparing our headers with other working sites we found it was the vary header that was messing things up. Unsetting that header for those file types fixed our issue right away.

<FilesMatch "\.(woff)$">
    Header unset Vary
</FilesMatch>

<FilesMatch "\.(eot)$">
    Header unset Vary
</FilesMatch>

这篇关于@ font-face EOT无法通过HTTPS加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆