I'm designing a page for a college campus that *still* has some of its public computers running Netscape 3.5... Needless to say, I'm tired of dumbing down the code for the entire page enough to make the version that is displayed on Net 3.5 look decent.
What I want to do is have all relatively recent browsers (IE4+, Netscape4+, and Safari) redirect to a main page - index2.php - while the old browsers Netscape3-, and so on be redirected to a another - index-outdated.php - for a more basic page. I found this script and I've been playing around with it a little to get it to work, but I've been lacking success. Any ideas?
Code: Select all
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var name = navigator.appName;
var vers = navigator.appVersion;
vers = vers.substring(0,1); // or 0,4 could return 4.5 instead of just 4
if (name == "Microsoft Internet Explorer")
url="msie";
else
url="netscape";
url += vers + ".html";
window.location=url;
// End -->
</script>E