I want to bounce users of our web site to an error page if they\'re using a version of Internet Explorer
prior to v9. It\'s just not worth our time and money to
Use conditional comments. You're trying to detect users of IE < 9 and conditional comments will work in those browsers; in other browsers (IE >= 10 and non-IE), the comments will be treated as normal HTML comments, which is what they are.
Example HTML:
You can also do this purely with script, if you need:
var div = document.createElement("div");
div.innerHTML = "";
var isIeLessThan9 = (div.getElementsByTagName("i").length == 1);
if (isIeLessThan9) {
alert("WE DON'T LIKE YOUR BROWSER");
}