【问题标题】:IE Conditional Comment IssueIE 条件注释问题
【发布时间】:2011-10-30 16:35:44
【问题描述】:

在一个新的应用程序中,我们决定不再支持 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 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"

有什么想法吗??

安迪

【问题讨论】:

  • 我的建议是首先不要有消息。 IE6 现在已经成为过去。世界上只有不到 10% 的人使用它!甚至微软也在试图扼杀它:ie6countdown.com
  • 我同意,但是,我们大约 8% 的用户仍在使用 IE6,如果使用低于 IE7 的任何东西,这个特定的应用程序将无法正常工作。我们选择不添加所有 IE6 css 和 js hack。

标签: html internet-explorer-8 internet-explorer-7 internet-explorer-6 conditional-comments


【解决方案1】:

IE 7 / 8 可能正在使用 IE6 "compatibility mode"

【讨论】:

  • IE7还有兼容模式吗?
  • 我以为是 IE 7 以后的版本,但我可能错了。恐怕我没有安装 IE 7 来测试。
猜你喜欢
  • 2016-07-22
  • 2011-02-04
  • 2012-05-23
  • 2012-04-26
  • 2012-02-24
  • 1970-01-01
  • 2014-04-02
  • 1970-01-01
  • 2014-06-21
相关资源
最近更新 更多