Link to home
Start Free TrialLog in
Avatar of bizware
bizware

asked on

Conditional Redirection

I would like a comprehensive understanding of the conditions under which I can redirect a visitor to another page.

I am aware of unconditional redirection such as the META|REFRESH, and conditional redirection such as NO FRAMES (if visitor's browser doesn't support frames) or NO SCRIPT (if visitor's browser doesn't support Javascript).

I beleive there are ways to redirect based on other conditionals, such as browser version.  Are there other conditionals, such as the visitor's domain name, on which I can base an automatic link to a designated page?
Avatar of bizware
bizware

ASKER

Edited text of question
To redirect depending on browser:
if (navigator.appName.indexOf("Netscape") != -1)
  location.href = "netscape.htm";
if (navigator.appName.indexOf("Microsoft") != -1)
  location.href = "ie.htm";
else
  location.href = "otherbrowser.htm";

Martin
Forgot to mention...the code I posted i JavaScript.
Use it like this:
<SCRIPT LANGUAGE="JavaScript">
<!--
if (navigator.appName.indexOf("Netscape") != -1)
  location.href = "netscape.htm";
if (navigator.appName.indexOf("Microsoft") != -1)
  location.href = "ie.htm";
else
  location.href = "otherbrowser.htm";
// -->
</SCRIPT>
ASKER CERTIFIED SOLUTION
Avatar of jbirk
jbirk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial