Banning Internet Explorer

Whenever I work on a html/javascript experiment I usually test it on Chrome. Once I'm done, I test it on Firefox and Opera. There is no Safari for Linux so I don't have an easy way for testing it so I usually assume it works as it's very similar to Chrome. The interesting thing is that the same code usually works directly on the other browsers. Just special cases like adding custom css properties (like -webkit-transform, MozTransform, OTransform...).

Of course, that's not the case with Internet Explorer. And to be honest I never really tried to make anything work on it. I believe that browser has made humanity lose a lot of time and money so making my experiments work will be like helping it to stay alive.

But I wasn't showing any error message. My experiments will just not work and people will mention it and complain. I really didn't want to add Javascript browser checks in each experiment either. However, there was a much simpler and efficient solution, add a rule on the .htaccess to redirect all the request from that browser to this page.

By banning all the request of that browser, not only I'm happier when developing but also I may move some of these users to a better browser, and at the same time, other developers won't have to suffer from these users.

Imagine if all the major websites did this. Wouldn't that fix the problem?

If you find the move interesting and you would like to stop supporting IE too, this is the code you'll need to put in you .htaccess file:

RewriteEngine on

RewriteCond %{REQUEST_URI} !/projects/ie/index.html$
RewriteCond %{HTTP_USER_AGENT} MSIE [NC]
RewriteRule ^(.*)$ /projects/ie/index.html [L]

Just change the /projects/ie/index.html parts with wherever you put your own message/page.

See original: Anu's shared items in Google Reader Banning Internet Explorer