IE9浏览器检测显示IE8
出于调试目的,我的 Web 应用程序在每个页面的底部显示用户的浏览器、版本和操作系统 - 这是用 Javascript 完成的。
在使用IE9进行开发和测试时,浏览器和版本完美呈现。
实时应用程序的三个实例在同一网络服务器上运行。我注意到其中只有一个,圆角不显示 - 阴影也不显示 - 并且浏览器被检测为 IE8(使用 IE9 时)并且缺少兼容性视图按钮!
有什么想法如何解决这个问题吗?谢谢!
For debugging purposes, my web application shows the user's browser, version and operating system on the bottom of every page - this is done in Javascript.
In development and testing using IE9, the browser and version appear perfectly.
Three instances of the live application are running on the same webserver. I noticed on only ONE of them, rounded corners dont show up - and neither do shadows - and the browser is detected as IE8 (when using IE9) and the compatibility view button is missing!
Any ideas how to fix this? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您是否有可能为该站点打开了开发人员工具,并且为“浏览器模式”或“文档模式”选择了 Internet Explorer 8?
如果没有,请在 HTML 中查找恶意元标记:
Is it possible you have the developer tools open for the site and you have selected Internet Explorer 8 for the "Browser Mode" or "Document Mode"?
If not, look for a rogue meta tag in your HTML:
这几乎可以肯定是因为浏览器正在进入 IE8 兼容模式。
这可能是由多种因素触发的,但当出现意外时,通常是由于浏览器配置所致。
单击工具菜单,然后选择“兼容性视图设置”菜单选项。这将向您显示哪些情况会导致浏览器进入兼容模式。最常见的原因是“本地 Intranet”设置。当您查看本地网络上的站点(包括
localhost
)时,这会导致浏览器使用兼容模式。您可以通过在 HTML 代码中添加元标记来覆盖此设置,如下所示:
这将强制 IE 忽略配置设置并始终使用正确的渲染引擎而不是兼容模式。
希望有帮助。
This is almost certainly because the browser is going into IE8-compatibility mode.
This can be triggered by various things, but when it's unexpected it is typically because of browser configuration.
Click on the tools menu, and select the "Compatibility view settings" menu option. This will show you what instances cause the browser to go into compatiblity mode. The most common cause is the "Local intranet" setting. This causes the browser to use compatiblity mode when you view a site on your local network (this includes
localhost
).You can override this by adding a meta tag to your HTML code, as follows:
This will force IE to ignore the config setting and always use the the correct rendering engine rather than compatiblity mode.
hope that helps.