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

简介:         细心的朋友会发现下面的html代码中多了一个标签!源码下载网 - 提供最新免费网站源码下载  那这个标签是什么意思呢?让我来看下msdn上的说明:  In IE8 Beta 1, that op...

 

 

      细心的朋友会发现下面的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" />标签!

目录
相关文章
|
分布式计算 Java Hadoop
MapReduce编程(一) Intellij Idea配置MapReduce编程环境
介绍如何在Intellij Idea中通过创建maven工程配置MapReduce的编程环境。 一、软件环境 我使用的软件版本如下: Intellij Idea 2017.1 Maven 3.3.9 Hadoop伪分布式环境( 安装教程可参考这里) 二、创建maven工程 打开Idea,file->new->Project,左侧面板选择maven工程。
2622 0
|
7月前
|
供应链 监控 物联网
新纪元的技术浪潮:区块链、物联网与虚拟现实的未来展望
随着科技的不断进步,新兴技术如区块链、物联网和虚拟现实正在逐步改变我们的生活方式和工作模式。本文旨在深入探讨这些技术的发展趋势,并分析其在未来可能的应用场景。我们将从区块链技术的安全性和去中心化特点出发,讨论其在金融、供应链管理等领域的应用潜力;探索物联网如何通过智能设备连接实现高效的数据收集与分析,进而推动智慧城市和工业自动化的发展;同时,分析虚拟现实技术在教育、医疗和娱乐领域的革新作用。文章将结合最新的研究成果和市场动态,为读者提供一个全面而深入的视角,以理解这些技术如何塑造未来社会和经济的面貌。
|
9月前
|
数据安全/隐私保护
滞回曲线处理器,骨架曲线,延性系数,耗能面积
为了批量处理拟静力试验得到的滞回曲线,计算骨架曲线,延性系数,耗能等指标,开发了“滞回曲线处理器”软件,具体功能介绍如下,软件在文末获取。
滞回曲线处理器,骨架曲线,延性系数,耗能面积
|
9月前
|
JavaScript
vue的12個常用命令
vue的12個常用命令
50 0
|
移动开发 编解码 前端开发
移动端H5网页开发必备知识
H5网页开发必备知识
175 0
1106 2019数列(JAVA)
把 2019 各个数位上的数字 2、0、1、9 作为一个数列的前 4 项,用它们去构造一个无穷数列,其中第 n(>4)项是它前 4 项之和的个位数字。例如第 5 项为 2, 因为 2+0+1+9=12,个位数是 2。
|
Cloud Native
100页ppt讲清楚云原生(5)
100页ppt讲清楚云原生(5)
162 0
100页ppt讲清楚云原生(5)
|
机器学习/深度学习 数据采集 人工智能
大数据与人工智能应用的7个常见误区
随着越来越多的组织采用大数据技术处理大量、快速、多变的信息资产,通常很快就会面临如何从中有效地获得洞察力和商业价值的问题,这就涉及到了大数据和人工智能。大数据和人工智能之间存在着紧密的关系,大数据是燃料,人工智能是手段。
276 0
|
Web App开发 前端开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html><head><meta http-equiv="Cont
Every Programmer Should Know These Latency Numbers 1秒=1000毫秒(ms) 1秒=1,000,000 微秒(μs) 1秒=1,000,000,000 纳秒(ns) 1秒=1,000,000,000,000 皮秒(ps) L1 cache reference .
663 0
|
机器学习/深度学习 网络协议 Shell
linux tcpdump
tcpdump采用命令行方式对接口的数据包进行筛选抓取,其丰富特性表现在灵活的表达式上。 不带任何选项的tcpdump,默认会抓取第一个网络接口,且只有将tcpdump进程终止才会停止抓包。
824 0

热门文章

最新文章