I wanted to something like this on my web page: If the browser accessing the page is Internet Explorer 8.0 or earlier, I want to alert the user that you need to upgrade your browser and do not load the page. Else if you are using other browsers, then simply load the page and proceed normally.
The reason, I don't want to load the page in IE right now is because, the css3 goes crazy in IE, which work perfectly in Chrome, Mozilla etc. I am working on that and hope to get it fixed in a day or two. Meanwhile, I dont want anybody to be able to open my web page using IE 8.0 or earlier.
I tried these, but to no avail:
<script type="text/javascript">
nav=navigator.appName;
if (nav.indexOf("IE 8.0")!=-1)
{
alert("You are using an older version");
}
else
{
alert("Switch to a new version");
}
</script>
I want to do this using Javascript. How can I do it ?