If a page depends on JavaScript, provide a usable fallback or a clear message for visitors who have scripts disabled. The HTML <noscript> element is designed for content that should appear when scripting is unavailable.
The original Plus2net example also redirected visitors to instructions for enabling JavaScript. That facility is preserved in the demo.
Demo of JavaScript support and redirecting
When scripting is enabled, the normal JavaScript runs. When scripting is disabled, content inside the body-level <noscript> is shown. The demo also places a meta refresh inside a head-level <noscript> so the original redirect behavior remains available without JavaScript.
<noscript>
JavaScript is disabled. <a href="enable_javascript.php">Enable JavaScript</a>.
</noscript>
This source matches the modernized demo and remains directly copyable as one page.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>JavaScript support demo</title>
<noscript>
<meta http-equiv="refresh" content="10; URL=enable_javascript.php">
</noscript>
</head>
<body>
<h1>JavaScript support check</h1>
<p id="jsStatus">Checking JavaScript status…</p>
<noscript>
<p>JavaScript is disabled. This page will redirect to the JavaScript enabling instructions in 10 seconds.</p>
<p><a href="enable_javascript.php">Open the instructions now</a>.</p>
</noscript>
<script>
document.getElementById("jsStatus").textContent = "JavaScript is enabled in this browser for this page.";
</script>
<p><a href="javascript_support.php">Return to the JavaScript support tutorial</a></p>
</body>
</html>
Whenever practical, core information and navigation should still be available without JavaScript. If a feature truly requires scripting, explain what is unavailable and provide a direct route to the browser-setting instructions rather than leaving a blank page.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
| Amirreza | 27-06-2014 |
| Perfect method! Used on my webiste,It fully works without any errors! | |
| soma | 02-08-2016 |
| meta tags can be disabled in some browsers. | |
| smo1234 | 02-10-2016 |
| No, meta tags can't be disabled.. | |