Website Design Edmonton       Website Design Feedback       Website Design Sitemap     Contact Website Design Company
Website Designers R Us - Home
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.

Return to Listing

Website Designer R Us is one the leading website design companies on the internet. Based out of Toronto, Canada the company has dsigned and developed more than a 1000 websites worldwide.
 Home          ::             About Us          ::             Support            ::             Services            ::             Link Partners          ::             Contact

Copyright © 2006-2011 Website Designers R Us, a DOT Specialist Company. All rights reserved.