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

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

You are here: irt.org | FAQ | JavaScript | General | Q295 [ previous next ]

<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.

©2018 Martin Webb