IE8新特性 & 兼容性
谈起IE浏览器,一直是front-developer们心中的痛,包括我,也不能独善其身。
首先,让我们来看看目前全球浏览器市场占有率的蛋糕划分图:
data from: Net Applications
从上面数据看来,IE目前占浏览器市场大约67.55%,目前正在呈下滑趋势,从2004年开始占有率一直没再上升过。而Google也推出了Chrome,并以强大的Javascript引擎速度优势给业界带来了不错的反响,目前占有市场的大约1.13%份额。在市场压力下,Microsoft当然也不会丢下这块肥肉不管,也陆续往市场推出了IE8 beta1、beta2,并强调在浏览器安全性、稳定性及W3C标准化的改变,减少对使用和开发者的干扰。
至于IE8的新特性:WebSlice、加速器、Instant Search等,微软IE官方网站已有详细介绍,大家也可在网上百度 一下,在此我不再啰嗦重复。
其实IE每增加一个新版本,都会让所有的front-developer心惊肉跳,因为不知又要牺牲多少无谓的测试工作量和增加多少的Hack技巧,权衡之下,如果既希望现有的网站在旧的IE7显示正常,也可兼顾IE8,最快捷的方法就是通过在<head>中加<meta http-equiv="X-UA-Compatible" content="IE=7" />Tag使网页在IE8中以IE7兼容模式运行(参考Defining Document Compatibility)
还有一种方式站点管理员通过配置IIS的Web.config文件,往每个页面自动添加meta标记,代码如下:
<?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>
其它相关资源:
I have been working in web and interactive design for over five years. Starting out as a visual designer and front end developer, I have spent the last few years focusing on user experience design and strategy.
1 Comment
Jump to comment form | comments rss [?] | trackback uri [?]