Script Categories

User Details >>> Browser Version Redirect.

If you maintain separate pages for Netscape and Internet Explorer browsers and want to additionally divide each browser's page into version pages, this script is for you. The script will create a link (or can be changed to automatically redirect) to browser[version number].html. (For example, a visitor with Netscape 4.5 would see a link to netscape4.html).

Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">
/* Visit for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- 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 += vers + ".html";
document.write('<center><font face="arial,helvetica" size="+1">');
document.write('[ Here there would be a link for ' + url + ' ]');

// You may make the redirection automatic by using this
// window.location=url;
// instead of the three document.write lines above

// End -->

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.

Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).