Detect IE version (prior to v9) in JavaScript
问题 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 support IE pre-v9 . Users of all other non-IE browsers are fine and shouldn\'t be bounced. Here\'s the proposed code: if(navigator.appName.indexOf(\"Internet Explorer\")!=-1){ //yeah, he\'s using IE var badBrowser=( navigator.appVersion.indexOf(\"MSIE 9\")==-1 && //v9 is ok navigator.appVersion.indexOf(\"MSIE 1\")==-1 //v10, 11, 12,