[英]IE8 compatibility mode button missing
I'm developing a website using Umbraco and I'd like to flick between IE8 and IE7 using the compatibility button, but it's hidden. 我正在使用Umbraco开发一个网站,并且我想使用兼容性按钮在IE8和IE7之间切换,但是它是隐藏的。 It is an internal address but I've not had the problem with similar sites on the same server.
这是一个内部地址,但是同一台服务器上的相似站点没有出现问题。 (The only difference is this is using a 'non-standard' port 8080, I shouldn't think that would make a difference?)
(唯一的区别是这使用的是“非标准”端口8080,我不认为这会有所作为吗?)
I've checked the following blog post; 我检查了以下博客文章; Compatibility View Button Missing in IE8
IE8中缺少兼容性视图按钮
Which states, 哪个州
The Compatibility View button will be missing for the following reasons,
出于以下原因,“兼容性视图”按钮将丢失:
- If you're viewing any webpage and you have the 'Display all websites in Compatibility View' checkbox selected in Tools > Compatibility View Settings.
如果您正在查看任何网页,并且在“工具”>“兼容性视图设置”中选中了“在兼容性视图中显示所有网站”复选框。
- If you're viewing a webpage that is included on the Microsoft-supplied compatibility view updates list and you have the 'Include updated website lists from Microsoft' checkbox selected in Tools > Compatibility View Settings,
如果您正在查看Microsoft提供的兼容性视图更新列表中包含的网页,并且在“工具”>“兼容性视图设置”中选中了“包括来自Microsoft的更新的网站列表”复选框,
- If you're viewing an intranet page and you have the 'Display intranet sites in Compatibility View' checkbox selected in Tools > Compatibility View Settings.
如果您正在查看Intranet页面,并且在“工具”>“兼容性视图设置”中选中了“在兼容性视图中显示Intranet站点”复选框。
- If you've toggled either the 'Document Mode' or 'Browser Mode' settings via the Developer Toolbar.
如果您通过开发者工具栏切换了“文档模式”或“浏览器模式”设置。
- If you're viewing a page that has declared it's “ready” for Internet Explorer 8.
如果您正在查看已声明其为Internet Explorer 8“就绪”的页面。
My site/browser settings don't fall into any of these categories so I can only presume there's more factors involved. 我的网站/浏览器设置不属于上述任何类别,因此我只能假定其中涉及更多因素。
I'm using the following DOCTYPE in all of my pages, 我在所有页面上都使用以下DOCTYPE,
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
I can force IE to render using the latest version by including, 我可以通过以下方式强制IE使用最新版本进行渲染:
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
But this doesn't give me the functionality to switch browser modes via the button. 但这并没有给我提供通过按钮切换浏览器模式的功能。
this is to make html5 to work in IE8,9 这是为了使html5在IE8,9中工作
<!--[if lt IE 9]>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js" type="text/javascript"></script>
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/ie7-squish.js" type="text/javascript"></script>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
Hope this will help 希望这会有所帮助
If you are indeed including this tag in your page 如果您确实在页面中包含此标签
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
then that is why the button is missing. 这就是为什么按钮不见了。 You've communicated to IE that the site is (supposedly) compatible with its standards rendering mode.
您已与IE交流,该网站(据说)与其标准呈现方式兼容。 Hence it will not display a button to the user for compatibility mode because that would (supposedly) allow the user to accidentally switch the rendering mode, potentially mangling the visual layout of your site.
因此,它将不会向用户显示用于兼容模式的按钮,因为(据说)这将允许用户意外切换呈现模式,从而有可能破坏网站的视觉布局。
Ironically, I've often had the opposite problem. 具有讽刺意味的是,我经常遇到相反的问题。 The button frequently shows up when I don't want it to.
我不希望出现该按钮时,它经常出现。 The criteria for whether or not it shows up seems very finicky.
是否显示的标准似乎很挑剔。 Should you every want the opposite behavior (no button being present) I recommend making the above meta tag the first tag of your header.
如果每个人都想要相反的行为(不存在任何按钮),我建议将上面的meta标签作为标题的第一个标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.