为什么我的网站以 IE8 兼容模式呈现?

发布于 2024-09-30 01:08:34 字数 436 浏览 0 评论 0原文

我们使用的 js 库尚不兼容 IE9。为了使我们的网站能够正确呈现,我们添加了以下元标记,直到库更新为止:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

文档类型是:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >

这在 IE9 中按预期工作(浏览器模式是 IE8 兼容模式)。

在本地主机上的 IE8 中它也是正确的(浏览器模式是 IE8),但是当在我们的服务器上查看测试站点时,浏览器模式是 IE8 兼容性视图。

我错过了什么?

We are using a js library that is not yet compatible with IE9. In order for our website to render correctly, we have add the following meta tag until the library is updated:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

The doctype is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >

This works as expected in IE9 (Browser Mode is IE8 Compatibility Mode).

In IE8 on localhost it is also correct (Browser Mode is IE8), but when viewing the test site on our server, the Browser Mode is IE8 Compatibility View.

What have I missed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最近可好 2024-10-07 01:08:34

仅当您的服务器位于 Intranet 上时,这才适用:“

兼容性视图设置”中有一个选项可以强制 IE 对 Intranet 网站使用兼容模式:

“工具”菜单,然后“兼容性视图设置”并取消选中“以兼容模式显示 Intranet 站点

”希望对你有帮助。

This applies only if your server is on your intranet :

There is an option in the Compatibility View Settings that force IE to use the compatibility mode for intranet websites :

Tools menu, then Compatibility View Settings and uncheck 'Display intranet sites in compatibility mode'

I hope it helps you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文