Javascripts > Misc Javascripts > Detect & Redirect
Script Title: Detect & Redirect
Description: A simple script that will detect a viewers browser version and direct to proper URL.
Example: No example available for this script.
Copy the following code into your <HEAD></HEAD> tags.<script language="JavaScript"> /* This Script Free To Use Providing This Notice Remains This Script Has Been In The http://www.DesignerWiz.com Javascript Public Archive Library More found at Java-scripts.net http://www.java-scripts.net */ function WHATISIT(){ var browserName = navigator.appName; var browserVer = parseInt ( navigator.appVersion ); var name = "0"; if ( browserName == "Netscape" && browserVer >= 4 ) name="1"; if ( browserName == "Microsoft Internet Explorer" && browserVer >=4 ) name="2"; if ( browserName == "Netscape" && browserVer < 4 )name="3"; if ( browserName == "Microsoft Internet Explorer" && browserVer <4 )name="4"; if ( browserName != "Microsoft Internet Explorer" && browserName != "Netscape") name="5"; if (name == "5")location.href=("your favorite page url here"); if (name == "1") location.href=("if Netscape url here"); else if (name == "2") location.href=("if Internet Explorer url here"); else if (name == "3") location.href=("if Netscape url here"); else location.href=("if Internet Explorer url here"); } </script>
Enter your name and email address to have this script sent right to your Inbox for later viewing. First Name Last Name Email