IE 条件评论问题

发布于 2024-11-30 20:02:31 字数 1116 浏览 7 评论 0原文

在一个新的应用程序中,我们决定不再支持 IE6,因此我们有一个条件注释来加载包含同样内容的脚本。

代码是:

<!--[if lt IE 7]>
            <h2 style="color:red;">Old Version of Internet Explorer Detected</h2>
            <p style="color:red;">It appears that you're using an old version of Microsoft
            Internet Explorer.  This site is optimized for Internet Explorer 
            7 and above as well as Mozilla Firefox.  Please download a 
            newer version of <a href="https://www.microsoft.com/windows/Internet-explorer/default.aspx">
            Internet Explorer</a> or <a href="https://www.mozilla.com/firefox/">Firefox</a>
            before continuing.
            </p>
<![endif]-->

然而,对于一家公司来说,尽管他们使用 IE7 和 IE8,但该评论还是被火了。

这是访问日志,出于隐私原因删除了信息。

10.xxx.xx.xx - - [15/Aug/2011:17:18:54 -0500]“GET /broker/js/ie6.js HTTP/1.1”200 147“https://xx.xxxxx.com /broker/registration" "Mozilla/4.0(兼容;MSIE 7.0; Windows NT 5.1; Trident/4.0;.NET CLR 2.0.50727;.NET CLR 3.5.30729;.NET4.0E)“en-us

” ??

安迪

On a new application we've made a decision to no longer support IE6, so we have a conditional comment to load a script that says as much.

Code is:

<!--[if lt IE 7]>
            <h2 style="color:red;">Old Version of Internet Explorer Detected</h2>
            <p style="color:red;">It appears that you're using an old version of Microsoft
            Internet Explorer.  This site is optimized for Internet Explorer 
            7 and above as well as Mozilla Firefox.  Please download a 
            newer version of <a href="https://www.microsoft.com/windows/Internet-explorer/default.aspx">
            Internet Explorer</a> or <a href="https://www.mozilla.com/firefox/">Firefox</a>
            before continuing.
            </p>
<![endif]-->

However, for one company, the comment fires, despite their use of IE7 and IE8.

Here's the access log with info removed for privacy.

10.xxx.xx.xx - - [15/Aug/2011:17:18:54 -0500] "GET /broker/js/ie6.js HTTP/1.1" 200 147 "https://xx.xxxxx.com/broker/registration" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)" "en-us"

Any ideas??

Andy

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

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

发布评论

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

评论(1

滿滿的愛 2024-12-07 20:02:31

IE 7 / 8 可以使用 IE6 " 兼容模式“

IE 7 / 8 could be using IE6 "compatibility mode"?

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