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?
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...
The site is built in CodeIgniter with a lot of Backbone.js.
If anyone has any ideas they would be appreciated.
Thanks!
UPDATE
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".
Do it with CSS and conditional comments.
<head>
<!--[if IE lte 8]>
<link rel="stylehseet" type="text/css" href="blockIE.css" />
<[endif]-->
</head>
<body>
<div class="yourcontent">
...
</div>
<div class="notification">
<h1>Sorry, we don't support your old browsers</h1>
</div>
</body>
CSS:
body * { display: none }
.notification { display: block; }
You can also do it with CodeIgniter, https://www.codeigniter.com/user_guide/libraries/user_agent.html
Something like:
$this->load->library('user_agent');
if ($this->agent->browser() == 'Internet Explorer' && $this->agent->version() <= 8){
//Redirect or show error
}
(Also answered here: Code Igniter - Best way to detect browser)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With