简体   繁体   English

为什么即使关闭了兼容模式并且在标头和标记中都设置了X-UA-Compatible,IE8也不能在Intranet站点上呈现Webfonts?

[英]Why does IE8 not render webfonts on an intranet site even though compatibility mode is off and X-UA-Compatible is set in both header and tag?

I'm working on a site for a corporation that uses their own customized, locked-down version of IE8 (including Developer Tools being switched off, yay). 我正在为一家公司使用自己的自定义锁定版本IE8(包括关闭的开发人员工具)的公司工作。 I recently added webfonts to the site. 我最近在网站上添加了webfonts。 These render as expected even under the corporation's own IE8 when viewed as static pages stored locally on one of their computers, but they do not render at all when served from a running system accessed over a network. 当被视为本地存储在其一台计算机上的静态页面时,即使在公司自己的IE8下也可以按预期方式进行渲染,但是当从通过网络访问的运行中系统提供服务时,它们根本不会渲染。

I expected that the problem was due to IE8's default setting of displaying intranet sites in compatibility mode. 我预计该问题是由于IE8的默认设置(以兼容模式显示Intranet网站)引起的。 Sure enough, as long as the site is included in this zone, webfonts do not render correctly. 当然,只要该站点包含在该区域中,webfonts就无法正确呈现。 If I add the site to the Trusted zone, the webfonts appear as expected. 如果我将站点添加到“受信任”区域,则Webfonts会按预期显示。

The catch is, "Display intranet sites in compatibility mode" is actually switched off, so the zone shouldn't make a difference as far as compatibility mode goes. 问题是,“以兼容模式显示Intranet站点”实际上已关闭,因此,就兼容模式而言,该区域不应有所作为。 I don't think the corporation's admins are overriding this setting, because the registry keys for "IntranetCompatibilityMode" and "AllSitesCompatibilityMode" (which I can view but not edit) are both set to 0. Additionally, we are explicitly requesting standards mode by setting the HTML5 doctype and setting both the response header and the meta tag for X-UA-Compatible to IE=edge. 我认为公司的管理员不会覆盖此设置,因为“ IntranetCompatibilityMode”和“ AllSitesCompatibilityMode”(我可以查看但不能编辑)的注册表项都设置为0。此外,我们通过设置来明确请求标准模式HTML5文档类型,并将响应标头和X-UA-Compatible的meta标签设置为IE = edge。

Because I don't have the IE Developer Tools available, I cannot verify for certain that the reason the webfonts are not displaying while in the intranet zone is because the page is being rendered in compatibility mode. 由于我没有可用的IE开发人员工具,因此无法确定无法确认在Intranet区域中Web字体不显示的原因是页面是在兼容模式下呈现的。 So my questions are: 所以我的问题是:

Problem identified and compatibility mode is not the cause. 确定问题,而不是兼容模式。 I looked into the difference in security settings between the zones and found that the corporate admins have deactivated the setting to allow "Download Fonts" in the Intranet zone. 我调查了区域之间安全设置的差异,发现公司管理员已停用该设置,以允许Intranet区域中的“下载字体”。 This applies even though the fonts are hosted on the same domain. 即使字体托管在同一域中,这也适用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM