(page requirements)

How to deliver browser specific content using JavaScript

If you have a need to deliver browser specific web pages and if you don't have a server-side script to do this with, take a look at the following HTML/JavaScript code:
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
  if( -1 != navigator.userAgent.
      indexOf ("AOL") )
  {
    // load America Online version
    location.href="aol.htm";
  }
  else
  if( -1 != navigator.userAgent.
      indexOf ("MSIE") )
  {
    // load Microsoft Internet 
    // Explorer version
    location.href="msie.htm";
  }
  else
  if( -1 != navigator.userAgent.
      indexOf ("Mozilla") )
  {
    // load Netscape version
    location.href="netscape.htm";
  }
  else
  {
    // load other version
    location.href="other.htm";
  }
-->
</SCRIPT>

You can simply plug in above tags after replacing "netscape.htm" with the URL to your Netscape specific page, "other.htm" with your generic page's URL, "MSIE.htm" with the Microsoft Internet Explorer version of the page, etc.

 
 
Applicable Keywords : HTML, Internet Explorer, Explorer 3.x, Explorer 4.x, Explorer 5.x, Internet, JavaScript, JavaScript 1.0, JavaScript 1.1, JavaScript 1.2, Netscape Navigator, Navigator 2.x, Navigator 3.x, Communicator 4.x, Netscape 6.x, World Wide Web
 
 
 
Copyright © 2009 Chami.com. All Rights Reserved. | Advertise | Created in HTML Kit editor