日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

你的网站添加X-UA-Compatible meta标签了吗?

發布時間:2025/4/16 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 你的网站添加X-UA-Compatible meta标签了吗? 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
細心的朋友會發現下面的html代碼中多了一個<細心的朋友會發現下面的html代碼中多了一個<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />標簽!
???? <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
???? <meta http-equiv="Content-Language" content="gb2312" />
???? <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
???? <meta name="robots" content="all" />
???? <meta name="googlebot" content="all" />
???? <meta name="description" content="提供最新的asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件下載" />
???? <meta name="keywords" content="asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件" />
???? <title>源碼下載網 - 提供最新免費網站源碼下載</title>
???? <META name="copyright" content="www.downhtml.com" />

??????? 那這個標簽是什么意思呢?讓我來看下msdn上的說明:
??????? In IE8 Beta 1, that option is the “IE=7” X-UA-Compatible tag, which instructs IE8 to display content in IE7 Standards mode. However, the scenario this doesn’t address is when IE=7 is applied as an HTTP header to a site that contains Quirks mode pages. The IE=7 HTTP header will force all pages – both Quirks and Standards – to display in IE7 Standards mode. Developers using this header while updating their sites would then have to add the “IE=5” <META> tag to each page they want to keep in Quirks mode. This logic is fine for many websites. However, if a site has lots of Quirks mode pages, or for the case where pages with frames host a mix of Strict and Quirks mode content – as brought to light by IE8 Beta 1 user feedback – the compatibility opt-out adds a bit more work than we intended.

???? X-UA-Compatible是針對ie8新加的一個設置,對于ie8之外的瀏覽器是不識別的,這個區別與content="IE=7"在無論頁面是否包含<!DOCTYPE>指令,都像是使用了 Windows Internet Explorer 7的標準模式。而content="IE=EmulateIE7"模式遵循<!DOCTYPE>指令。對于多數網站來說,它是首選的兼容性模式。

????? 目前IE8尚在測試版中,所以為了避免制作出的頁面在IE8下面出現錯誤,建議直接將IE8使用IE7進行渲染。也就是直接在頁面的header的meta標簽中加入如下代碼:
<meta http-equiv="X-UA-Compatible" content="IE=7" />
這樣我們才能使得頁面在IE8里面表現正常! http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />標簽!
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="robots" content="all" />
<meta name="googlebot" content="all" />
<meta name="description" content="提供最新的asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件下載" />
<meta name="keywords" content="asp源碼,php源碼,.net源碼,flash源碼,網站源碼,網頁源碼,模板,軟件" />
<title>源碼下載網 - 提供最新免費網站源碼下載</title>
<META name="copyright" content="Downhtml.com" />

  那這個標簽是什么意思呢?讓我來看下msdn上的說明:

  In IE8 Beta 1, that option is the “IE=7” X-UA-Compatible tag, which instructs IE8 to display content in IE7 Standards mode. However, the scenario this doesn’t address is when IE=7 is applied as an HTTP header to a site that contains Quirks mode pages. The IE=7 HTTP header will force all pages – both Quirks and Standards – to display in IE7 Standards mode. Developers using this header while updating their sites would then have to add the “IE=5” tag to each page they want to keep in Quirks mode. This logic is fine for many websites. However, if a site has lots of Quirks mode pages, or for the case where pages with frames host a mix of Strict and Quirks mode content – as brought to light by IE8 Beta 1 user feedback – the compatibility opt-out adds a bit more work than we intended.

  X-UA-Compatible是針對ie8新加的一個設置,對于ie8之外的瀏覽器是不識別的,這個區別與content="IE=7"在無論頁面是否包含指令,都像是使用了 Windows Internet Explorer 7的標準模式。而content="IE=EmulateIE7"模式遵循指令。對于多數網站來說,它是首選的兼容性模式。

  目前IE8尚在測試版中,所以為了避免制作出的頁面在IE8下面出現錯誤,建議直接將IE8使用IE7進行渲染。也就是直接在頁面的header的meta標簽中加入如下代碼:
???????? <meta http-equiv="X-UA-Compatible" content="IE=7" />
  這樣我們才能使得頁面在IE8里面表現正常! http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />標簽!

????? 文章來源 源碼下載網 ww.downhtml.com 轉載請注明出處。

總結

以上是生活随笔為你收集整理的你的网站添加X-UA-Compatible meta标签了吗?的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。