【问题标题】:What determines whether the 'Compatibility View' button appears in Internet Explorer 8 or not?是什么决定了 Internet Explorer 8 中是否显示“兼容性视图”按钮?
【发布时间】:2009-10-14 16:04:26
【问题描述】:

在我正在开发的一些网站上,我注意到“兼容性视图”按钮显示在地址栏旁边。然而,当我查看其他网站时,我并不总是可以使用此按钮。

是什么决定了这个按钮是否显示给用户?是不是和<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">这个头部标签有关系?

(我在说什么的屏幕截图)


alt text http://img380.imageshack.us/img380/4858/compatabilitybutton.png

【问题讨论】:

  • 我认为 DOCTYPE 声明也与它有关。

标签: internet-explorer-8 internet-explorer-7 ie-developer-tools


【解决方案1】:

事实证明,唯一影响这一点的确实是<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"> 标签。

MSDN page 关于文档兼容性的注意事项:此标记必须出现在代码的 <head> 部分中,在 任何其他标记 之前,除了 <title> 标记.

【讨论】:

  • [This][1] 是另一个有用的 SO 问题。 [1]:stackoverflow.com/questions/897409/…
  • 除了 META 标签之外,您还可以通过 HTTP 标头指定它。或者该站点可能会出现在 CompatView 列表中。
猜你喜欢
  • 1970-01-01
  • 2019-03-29
  • 2012-07-31
  • 1970-01-01
  • 2012-02-05
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-07-01
相关资源
最近更新 更多