Forum Moderators: open
<html>
<head>
<title>Test Page</title>
</head>
<body>
<noscript>
How to redirect to /no-js.html here?
</noscript>
</body>
</html>
The <meta http-equiv="refresh" content="0;url=/no-js.html" /> is not allowed in <body> tag. The <noscript> tag is not allowed in <head> tag...
How to redirect inside HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224">
<html>
<head>
<title>Test Page</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript">
<!--
alert('javascript is enabled');
//-->
</script>
</head>
<body>
<noscript>
you have javascript disabled please go to...
<a href="no-js.html">no-js.html</a>
</noscript>
</body>
</html>
birdbrain
Maybe approach it from the other angle - make the non-javascript page the DEFAULT page, and then use javascript to redirect people who have js enabled.
This is the method that Gmail is using. I will try this method. A problem is, I have to update all links on my site to their non-js pages. Or I change all links to no-js.html and use javascript to to redirect like this:
<a href="/no-js.html" onmouseup="goto_page('home');">Home</a>
<a href="/no-js.html" onmouseup="goto_page('contact');">Contact Us</a>