IE 8相容:X-UA-Compatible的解釋,iex-ua-compatible

來源:互聯網
上載者:User

IE 8相容:X-UA-Compatible的解釋,iex-ua-compatible


來源:http://www.ido321.com/940.html

來自StackOverFlow

問題描述:

   1: <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7; IE=EDGE" />

1、這個到底是什麼意思?

2、一些樣本使用”,”分離IE的版本,而一些使用”;“,哪個正確?

3、我想知道IE=9; IE=8; IE=7; IE=EDGE順序的含義。

在文檔中使用了<!DOCTYPE>

回覆:

對於IE8及以上版本,例如:

   1: <meta http-equiv="X-UA-Compatible" content="IE=9; IE=8; IE=7" />

強制瀏覽器按照特定的版本標準進行渲染。但不支援IE7及以下版本。如果用分號(;)分隔,對於不同的瀏覽器版本就有不同的相容性,例如

   1: <meta http-equiv="X-UA-Compatible" content="IE=7; IE=9" />

以上就表明,將IE8和IE7按照IE7標準渲染,但是IE9還是按照IE9的標準渲染。它允許有不同的向後相容水平。儘管在真實情況中,你只要選擇一種版本:

   1: <meta http-equiv="X-UA-Compatible" content="IE=8" />
這對於測試和維護會更加簡單。而通常更加有用的方式就是進行模擬類比
   1: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

對於IE=EDGE

   1: <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

這意味著,會強制瀏覽器按照最新的標準去渲染。就像在Google’s CDN使用最新版本的JQuery一樣,這是按照最新版本,但也可能由於沒有固定的版本而破壞你的布局。

最後,考慮下面這個

   1: <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />

添加”chrome=1“將允許網站在使用了Google瀏覽器內嵌架構(Chrome Frame)的用戶端渲染,對於沒有使用的,則沒有任何影響。

For more information, there is plenty to read here, and if you want to learn about ChromeFrame (which I recommend) you canlearn about its implementation here.

 

PS:X-UA-Compatible是針對 IE8 版本的一個特殊檔案頭標記,用於為 IE8 指定不同的頁面渲染模式,對於ie8之外的瀏覽器是不識別的。

目前絕大多數網站都用<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ >來作為IE8的相容方法。為了避免製作出的頁面在IE8下面出現錯誤,建議直接將IE8使用IE7進行渲染。也就是直接在頁面的header的meta標籤中加入如下代碼:

<meta http-equiv=”X-UA-Compatible” content=”IE=7″ />

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ >

<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE8″ >

但是<meta http-equiv=”X-UA-Compatible” content=”IE=EmulateIE7″ >仍然是首選。

StackOverFlow原連結;http://stackoverflow.com/questions/14611264/x-ua-compatible-content-ie-9-ie-8-ie-7-ie-edge?answertab=active#tab-top


下一篇:你口中所謂的人脈,只是一個幌子!!!



誰可以詳細列舉出使IE6、IE7、IE8、Firefox瀏覽器相互相容的辦法,詳細解釋,最好有圖解重賞

理解為幾個瀏覽器共存的話,這個問題還是裝虛擬機器來解決好,
Firefox不必考慮,和ie不打架的,就是不同的ie不能共存,有個MultipleIEs不知道行不行,但據說也存在問題,如Cookie共存問題。
 
IE8 IE6相容問題<meta http-equiv="x-ua-compatible" content="ie=7"會不會覆蓋原meta的內容

不知道奧, 動手試試 不就知道了嗎 , 這句話具體是什麼意思啊?
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.