IE8兼容性和文档模式

发布于 2024-09-17 21:11:07 字数 559 浏览 0 评论 0原文

我想让 IE 8 将我的网站理解为 IE8。而不是在 IE7、兼容模式等中。

我在执行此操作时遇到了很多问题,即使我的本地主机中的同一站点与生产服务器中的站点不同。 (不管什么语言,发生在:php 和 asp.net)。

我一直在观看这些链接:

https://msdn .microsoft.com/en-us/library/cc288325(VS.85).aspx
https://msdn.microsoft.com/en-us/library/cc817574。 aspx

但我什么也没得到。

更新

是的,这正是我想要的,强制 IE 不要以兼容模式渲染页面

I want to make IE 8 understand my site as IE8. And not in IE7, compatibility mode, etc.

I have had a lot of issues to do this, even the same site in my localhost was different that in the production server. (Never mind what language, happened with: php and asp.net).

I've been watching these links:

https://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx
https://msdn.microsoft.com/en-us/library/cc817574.aspx

But I cound not get anything.

Update:

Yes, that is exactly what I want, force IE not to render the page in compatibility mode

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

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

发布评论

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

评论(2

書生途 2024-09-24 21:11:07

了解浏览器模式和文档模式之间的区别很重要。

文档模式受文档控制。设置 X-UA-Compatible 或 DocType 控制文档模式。

浏览器模式不受文档的控制,并且影响用户代理字符串和条件注释/版本向量。浏览器模式由用户的兼容性视图设置和文档的 URL 控制。例如,如果文档位于您的 Intranet 上,则默认情况下它处于兼容性浏览器模式。可以通过单击“工具”>“工具”来禁用此功能。兼容性视图设置>并取消选中“在兼容性视图中显示 Intranet 站点”。

您可以在 IE 开发人员工具(按 F12)中查看(并暂时覆盖)这两种模式。

It's important to understand the difference between Browser Mode and Document Mode.

Document Mode is under the control of the document. Setting the X-UA-Compatible or DocType controls the Document Mode.

Browser Mode is NOT under the control of the document, and affects the User-Agent String and Conditional Comments/Version Vector. Browser Mode is controlled by the user's Compatibility View settings, and the URL of the document. If the document is on your Intranet, for instance, by default it is in the Compatibility Browser Mode. This can be disabled by clicking Tools > Compatibility View Settings > and unticking "Display Intranet Sites in Compatibility View."

You can see (and temporarily override) both modes in the IE Developer Tools (hit F12).

情深缘浅 2024-09-24 21:11:07

我没有得到太多你的链接要么,但是当我将语言更改为英语时,它变成 比较容易理解

您尝试过吗?

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

这应该告诉 IE8 使用最新的 IE 引擎和设置来呈现页面,而不需要“旧浏览器模拟”。

I didn't get much of your link either, but when I changed the language to English, it became rather comprehensible.

Have you tried

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

That should tell IE8 to render the page using the latest IE engine and settings, with no "old browser emulation".

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