如何阻止IE8和向下?

我们刚刚完成了一个Web应用程序的开发,我们想要阻止Internet Explorer 8和它们。 完成此任务的最佳方法是什么?

我找到了阻止IE6的方法,但教程( http://css-tricks.com/ie-6-blocker-script/ )是从2008年开始的,我觉得它有点过时了。 我们还希望阻止IE 7和8 ……

该站点在CodeIgniter中构建,包含许多Backbone.js。

如果有人有任何想法,他们将不胜感激。

谢谢!

UPDATE

对不起家伙,更多信息:是的我想要阻止他们,我想显示一条消息,并能够设置页面样式说“对不起,你使用的是不是网络浏览器的Internet Explorer,请在这里下载CHROME”。

您也可以使用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 } 

(此处也回答: Code Igniter - 检测浏览器的最佳方法 )

用CSS和条件注释来做。

     
...

Sorry, we don't support your old browsers

CSS:

 body * { display: none } .notification { display: block; } 

这将检查IE 8浏览器和更低版本。 它用在中

  

你可以使用jQuery来做到这一点:

 //if its internet explorer... if(jQuery.browser.msie){ //getting the version if($.browser.version < 8){ //do whatever } } 

更多信息。

UPDATE

正如评论所指出的,不建议使用此function。 您应该看一下: 如何使用jQuery.support检测IE7和IE8

更新2

你也可以用这里指出的 PHP来做。

     

你可以使用htaccess来阻止MSIE

  RewriteEngine On RewriteBase / RewriteCond %{HTTP_USER_AGENT} MSIE RewriteCond %{REQUEST_FILENAME} !ban_ie.php RewriteRule .* /ban_ie.php [L] RewriteCond %{HTTP_USER_AGENT} MSIE RewriteCond %{REQUEST_FILENAME} !ban_ie.php RewriteRule .* /ban_ie.php [L]  

或者你可以使用PHP脚本

       
Mozilla Firefox"; } elseif (strstr($browser, "Opera")) { echo"Свалете си мозилла
Mozilla Firefox"; } else { header("Location: http://muonline-bg.eu/"); } ?>