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

Q295 How do I redirect the browser depending on whether the browsers supports JavaScript?

irt.org | Knowledge Base | JavaScript | General | Q295 [ previous next ]

Q295 How do I redirect the browser depending on whether the browsers supports JavaScript?

<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript"><!--
window.location.href='http://www.somewhere.com/apage.htm';
//--></SCRIPT>
<NOSCRIPT>
<META HTTP-EQUIV="Refresh" CONTENT="2;URL=http://www.somewhere.com/bapage.htm">
</NOSCRIPT>
</HEAD>
</HTML>

If the browser does not support JavaScript or JavaScript is not enabled then the meta tag will redirect to the new url after 2 seconds, otherwise the JavaScript will redirect straight away.


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.