Note: This tutorial is done by Macromedia Dreamweaver MX.
Intro: This tutorial will teach you how to make a script that will redirect users based on their browser type to different pages or url. It is restricted to two browser types only which are Internet Explorer and Netscape Navigator. You are not going to learn how to write this script, but learn how to use Dreamweaver to make such a script.
1. First open Dreamweaver and make a new page. Go to Window > Behaviors if your behaviors panel is not open. Then click on the + sign and choose Check Browser
2. You will be shown this window when you choose the Check BrowserOption.
Here you should make your choices, I have chosen here if the Browser is:
Netscapte Navigator 4.0 and later - go to www.yahoo.com and if it is Netscape Navigator < 4.0 - go to www.google.com
After you make your selection Click OK
3. Make sure onLoad option is chosen under the Events, we want users to be redirected when this page loads.
You are done, preview your page and see where you are redirected based on your Browser Type.
4. You could as well redirect all the users who are using Netscape Navigator to one page and Internet Explorer user to other. This way if you have two versions of you website for specific browser types, you could redirect them to respectie pages which are viewed best by their specific browser types. It is matter of how you use this script.
5. Another option is redirect all four options to one page, then it would become a normal redirection script that redirects all the users to one specific page.
Here is the code that is generated by Dreamweaver after this tutorial:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<body onLoad="MM_checkBrowser(4.0,1,2,4.0,1,2,2,'www.yahoo.com','www.google.com');return document.MM_returnValue">
|






