惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
V2EX
大猫的无限游戏
大猫的无限游戏
腾讯CDC
博客园 - Franky
WordPress大学
WordPress大学
Jina AI
Jina AI
GbyAI
GbyAI
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
Last Week in AI
Last Week in AI
The Cloudflare Blog
V
Visual Studio Blog
P
Proofpoint News Feed
博客园 - 叶小钗
L
LangChain Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Recorded Future
Recorded Future
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
Y
Y Combinator Blog
罗磊的独立博客
雷峰网
雷峰网
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
L
LINUX DO - 热门话题
Cisco Talos Blog
Cisco Talos Blog
L
Lohrmann on Cybersecurity
Martin Fowler
Martin Fowler
Spread Privacy
Spread Privacy
MongoDB | Blog
MongoDB | Blog
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
小众软件
小众软件
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Recent Announcements
Recent Announcements
T
Threat Research - Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
宝玉的分享
宝玉的分享
D
DataBreaches.Net
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
IT之家
IT之家
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
T
Troy Hunt's Blog
aimingoo的专栏
aimingoo的专栏

博客园 - Tobin

41岁的大龄程序员,苟着苟着,要为以后做打算了 UC_Center整合单点登录后远程注册不激活问题的解决办法 AspExe - a small ASP.NET compiler and executor for document generation 在as3中Embed(绑定)flash动画元素 - Tobin - 博客园 Embedding Resources with AS3 Configure the max limit for concurrent TCP connections [转]翻译:使用.net3.5的缓存池和SocketAsyncEventArgs类创建socket服务器 工商银行,千万别用,转账不成功一样收手续费 MySQL vs NoSQL 效率与成本之争(转) 使用ASP.NET Global.asax 文件(转) [MySql识记]create utf8 database - Tobin npgsql连接postgresql数据库 由浅到深了解JavaScript类[转过来的收藏] javascript改变this指针 哪个美女最漂亮,自己写的js图片自适应切换 javascript操作cookie实例 [图解] 你不知道的 JavaScript - “this”(转) 对与list<>泛型的一些操作方法 关于游戏开发中的A*/A-star的寻路算法的问题
强制将IE,Chrome设置为指定兼容模式来解析(转) - Tobin - 博客园
Tobin · 2010-10-11 · via 博客园 - Tobin

一.指定文件兼容性模式

要为你的网页指定文件模式,需要在你的网页中使用meta元素放入X-UA-Compatible http-equiv 标头。

1. 强制IE8使用IE8模式来解析,而且那个兼容性视图 按钮也被去掉了

<meta http-equiv="X-UA-Compatible" content="IE=8">

2. Google Chrome Frame也可以让IE用上Chrome的引擎:

<meta http-equiv="X-UA-Compatible" content="chrome=1" />

3.强制IE8使用IE7模式来解析

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"><!-- IE7 mode --> 或者

<meta http-equiv="X-UA-Compatible" content="IE=7"><!-- IE7 mode -->

4.强制IE8使用IE6或IE5模式来解析

<meta http-equiv="X-UA-Compatible" content="IE=6"><!-- IE6 mode -->   

<meta http-equiv="X-UA-Compatible" content="IE=5"><!-- IE5 mode --> 

5.如果一个特定版本的IE支持所要求的兼容性模式多于一种,如:

<meta http-equiv="X-UA-Compatible" content="IE=5; IE=8" />

二.设定网站服务器以指定预设兼容性模式

     网站管理员可籍着为网站定义一个自订标头来为他们的网站预设一个特定的文件兼容性模式。这个特定的方法取决于你的网站服务器。举例来说,下列的 web.config文件使Microsoft Internet Information Services (IIS)能定义一个自订标头以自动使用IE7 mode来编译所有网页。

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<clear />
<add name="X-UA-Compatible" value="IE=EmulateIE7" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>

       若你已于网站服务器指定了一个预设的文件兼容性模式,你可以在个别页面上指定不同的文件兼容性模式来盖过它。在网页中指定的模式优先权高于服务器中所指定的模式。

原文:http://www.cnblogs.com/yoyiorlee/archive/2010/10/10/1846994.html