您的位置:首页 > 编程语言 > Go语言

IE 加速插件之 Google Chrome Frame

2013-09-03 19:59 218 查看

前言

IE 8 及以下版本的速度较慢。 特别是前端的js 和 css 内容较多时尤为突出。

就笔者的开发经验来说GWT, Ext JS, raphael , draw2d 等开发的系统在IE下使用是相当的吃力。

特别是IE 的VML 看起来比SVG的效率要差多了。 IE 9 及以上倒是声明已经可以使用svg.

但是就目前的状况来说, IE 7 和IE 8 还是有一定的占有量的,

如何让IE 7 和IE 8 的速度快起来。 google 有开发一个IE的插件Google Chrome Frame。

不过不好的是,google在2014 之后就不再support 这个项目了。 因为google 认为到那个时候大家用的应该都是最新的浏览器, 再花钱维护这个项目也就没什么意义了。

下载安装

进以下地址:
http://www.google.com/chromeframe/eula.html
就可以在线安装了。

如果要下载离线安装版本,可以到:
http://www.google.com/chromeframe/eula.html?msi=true

页面开发

安装完成之后, 页面并不会自动生效, 需要在相应的html 加入以下标识

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


如果嫌每个页面都添加麻烦的话,也可以加到配置文件中:1. apache 服务器, httpd.conf文件中加入

<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
BrowserMatch chromeframe gcf
Header append X-UA-Compatible "chrome=1" env=gcf
</IfModule>
</IfModule>


2. IIS 服务器,web.config文件中加入

<configuration>
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="X-UA-Compatible" value="chrome=1" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
chrome=1   - Always activechrome=IE7 - Active for IE major version 7 or lowerchrome=IE8 - Active for IE major version 8 or lower


参考

1.

1. http://www.chromium.org/developers/how-tos/chrome-frame-getting-started
下载链接
https://skydrive.live.com/redir?resid=5B4EDBCD9EF1AB6B!183&authkey=!APx2nvFPe0m_PkI
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: