Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Redirect | Q249 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.