如何阻止IE8和下来? [英] How to block IE8 and down?

查看:108
本文介绍了如何阻止IE8和下来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们刚刚完成了一个Web应用程序的开发,我们要阻止Internet Explorer 8并向下。

We just finished developing a web application and we want to block Internet Explorer 8 and down. What is the best way to accomplish this?

我发现了一种阻止IE6的方法,但是教程(http://css-tricks.com/ie-6-blocker-script/ )是从2008年,我觉得它有点过时了。我们还要阻止IE 7和8 ...

I found a way to block IE6, however the tutorial (http://css-tricks.com/ie-6-blocker-script/) is from 2008 and I feel like it's a bit dated. We also want to block IE 7 and 8...

该网站是在CodeIgniter中构建的,有很多Backbone.js。

The site is built in CodeIgniter with a lot of Backbone.js.

如果有任何想法,他们会非常感激。

If anyone has any ideas they would be appreciated.

谢谢!

UPDATE

对不起,更多信息:是我想阻止他们,我想显示一条消息,对不起,您使用的不是网络浏览器的Internet Explorer,请从这里下载CHROME。

Sorry guys, more information: Yes I want to BLOCK them, I want to display a message and be able to style the page to say "Sorry, you use Internet Explorer which isn't a web browser, please download CHROME here".

推荐答案

与CodeIgniter,
http://ellislab.com/codeigniter/user-guide/libraries/user_agent .html

You can also do it with CodeIgniter, http://ellislab.com/codeigniter/user-guide/libraries/user_agent.html

如下:

$this->load->library('user_agent');
if ($this->agent->browser() == 'Internet Explorer' && $this->agent->version() <= 8){
    //Redirect or show error
}

(此处还回答:代码点击器 - 检测浏览器的最佳方式

这篇关于如何阻止IE8和下来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆