Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q249 How can I detect the users browser and then redirect them to a suitable page?

You are here: irt.org | FAQ | JavaScript | Redirect | Q249 [ previous next ]

Try something like this:

<SCRIPT LANGUAGE="JavaScript"><!--
if (navigator.appName == 'Netscape')
    location.href = 'netscape.html';
else {
    if (navigator.appName == 'Microsoft Internet Explorer')
        location.href = 'explorer.html';
    else if (navigator.appName == '*')
        location.href = 'other.html';
}
//--></SCRIPT>

©2018 Martin Webb