日本免费全黄少妇一区二区三区-高清无码一区二区三区四区-欧美中文字幕日韩在线观看-国产福利诱惑在线网站-国产中文字幕一区在线-亚洲欧美精品日韩一区-久久国产精品国产精品国产-国产精久久久久久一区二区三区-欧美亚洲国产精品久久久久

IE7 mode IE8兼容視圖與獨(dú)立IE7的區(qū)別詳解( 二 )


如下:

復(fù)制代碼代碼如下:
head runat="server"
meta http-equiv="X-UA-Compatible" content="IE=7" /
titlecest/title
/head

如果不寫(xiě)這句,就會(huì)默認(rèn)使用IE8了 。
另一個(gè)就是在客戶端,當(dāng)網(wǎng)站還沒(méi)來(lái)得及修改Meta時(shí),用戶如果裝了IE8,發(fā)現(xiàn)無(wú)法正常顯示,這時(shí)最后一招就是點(diǎn)擊Compatibility View按鈕了,它最終體現(xiàn)在User Agent上,也就是說(shuō)點(diǎn)了兼容性視圖按鈕,再提交的Http請(qǐng)求頭就被改寫(xiě)為 MSIE7.0,使客戶端偽裝成IE7來(lái)發(fā)送請(qǐng)求 。
如下:
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/5.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
按照該MSDN的說(shuō)法,修改Meta(X-UA-Compatible IE=EmulateIE7)的優(yōu)先級(jí)要高于點(diǎn)擊Compatibility View,它可以覆蓋掉Compatibility View的選擇,也就是說(shuō),一旦網(wǎng)站改版完成發(fā)布后,只要設(shè)置了Meta , 就可以使原來(lái)用戶瀏覽器上設(shè)置的Compatibility View作廢,從而自動(dòng)適應(yīng)新版本的IE8瀏覽器 。
三.IE8兼容視圖(IE7 mode)與獨(dú)立IE7不完全相同
請(qǐng)看Technet.Microsoft的帖子:
What Is Compatibility View?
http://technet.microsoft.com/zh-cn/ff966533
Compatibility View is a feature of Windows Internet Explorer 8 that enables the browser to render a webpage nearly identically to the way that Windows Internet Explorer 7 would render it.
In Internet Explorer 8, Compatibility View changes how the browser interprets code that is written in CSS, HTML, and the Document Object Model (DOM) to try to match Internet Explorer 7. A site that a user views in Internet Explorer 8 Compatibility View is almost identical to a site that the user views in Internet Explorer 7. However, Compatibility View does not change how the browser interprets all code. For example, the changes in Internet Explorer 8 for how the browser handles ActiveX, the parser, AJAX, JavaScript, networking, and security might still cause compatibility issues. Compatibility View does not change these behaviors.
In an enterprise environment, some areas have lower risk for compatibility issues. For example, Intranet Zone websites use Compatibility View by default. Client web applications that render by using the Web Browser Control, or the WebOC (Internet Explorer rendering engine), also have a low risk for compatibility issues because Internet Explorer 8 defaults to a compatibility mode for the WebOC. However, the default configuration settings for Compatibility View might not ensure complete compatibility. To determine if a website or web application is compatible with Internet Explorer 8, you should test the website or web application.
For more information about the differences between Internet Explorer 8 Compatibility View and Internet Explorer 7, see the Site Compatibility and Internet Explorer 8 blog. For a list of what to check when you upgrade to Internet Explorer 8, see the Internet Explorer 8 Readiness Toolkit.
For more information about Compatibility View, see the Internet Explorer Team Blog.
請(qǐng)看MSDN的帖子:
1. Differences between IE8 Compatibility View and IE7
http://blogs.msdn.com/b/ie/archive/2009/03/12/site-compatibility-and-ie8.aspx
摘抄:
We strive to make Compatibility View behave as much like IE7 as possible, but we do make exceptions. Many of these exceptions enable improved security and accessibility features immediately, even for sites that have not yet migrated to IE8 Standards Mode.
2. What EXACTLY does Compatibility View do in IE8?
http://webmasters.stackexchange.com/questions/2219/what-exactly-does-compatibility-view-do-in-ie8
精華摘抄:
Compatibility View renders the page as if it was Internet Explorer 7 (including Javascript). There are a few differences between IE8 with CV and pure IE7 but essentially it is the same. If you really want the detail of what is going on then read Just The Facts: Recap of Compatibility View from the IE MSDN blog.
You can also force IE8 to use CV with this meta tag:

推薦閱讀