View Full Version : browser redirection

08-20-2002, 10:08 PM
I am using the following script on my webpage. I would like to incorporate Netscape into this script. The result would be that if a user is using Netscape 4 that the page will automatically redirect the user to the page that is compatible with Netscape 4. With all of the differences between Netscape 4 stylesheets and Netscape 6 stylesheets I thought it would be easier to create two separate pages depending on what browser the user is
using. Can anyone help????? Thanks!!!

<script language="JavaScript">
var userAgent = navigator.userAgent;
var MSIEIndex = userAgent.indexOf("MSIE");
if (userAgent.indexOf("Win") == -1 ||
userAgent.indexOf("MSIE") == -1 ||
userAgent.substring((MSIEIndex + 5),(MSIEIndex + 6)) < 5)

08-20-2002, 10:19 PM
if (document.layers) {
window.location="netscape4page.html" }