How To Redirect If JavaScript Is Disabled In A Browser

How To Redirect If JavaScript Is Disabled In A Browser

This tutorial will help you to understand how to redirect a web page when JavaScript is disabled in a browser.

When we use JavaScript in web application, we must check for JavaScript is enabled in browser or not. Disabling JavaScript in a browser will remove web application validation and stop Ajax based actions.

Redirect Page after Certain Time using PHP, JavaScript or META Tag

So we must check JavaScript status of browser for security purposes.

There is a <noscript> tag available to accomplish this task.

Let’s see how to redirect a web page when JavaScript disabled in browser.

Adding this script in head tag will redirect to phpcluster.com when JavaScript disabled in a browser.

<noscript>   
<meta http-equiv="refresh" content="0; url=http://www.phpcluster.com/" />
</noscript>

Leave a Reply

Your email address will not be published. Required fields are marked *