IE内嵌google chrome frame解决浏览器兼容问题

来源:互联网 发布:淘宝ashford 编辑:程序博客网 时间:2024/05/12 17:46

参考文献:

http://www.pseudowired.com/2012/12/04/tomcat-http-header-manipulation/(html中自动添加使用chrome的header)

http://www.baike.com/wiki/Google+Chrome+Frame(google chrome frame介绍)

http://www.cnblogs.com/Libra/archive/2009/03/24/1420731.html


项目背景:

我们的项目中使用了highcharts和svg相关的内容,所以要求至少要IE9才可以,或者使用firefox、chrome等其他浏览器。但是客户是国企,他们使用的都是windows自带的浏览器,普遍是IE7和IE8,有些甚至还是windows xp自带的IE6,让人倍感崩溃。

当时建议客户升级IE版本,升级到至少IE9,但是他们的OA系统支持只IE7跟IE8,这样的事情还真有,我自己公司就是这样子。所以升级的提议被否决。

然后建议客户下载chrome浏览器,但是客户说他们很多人都是访问不了外网的,而且领导们都懒得下载浏览器,太麻烦。

无奈执行我就只能选择以下的解决方案

<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=IE8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">

var mimetype = navigator.mimeTypes["application/npclipboard"];//这里面的key就是你的插件的type
if(mimetype)
{
var plugin = mimetype.enabledPlugin;

if(plugin)
{
document.writeln("已经安装");
}
}
else
{
document.writeln("还未安装");
}

0 0
原创粉丝点击