How to redirect the page when javascript is disable in your browser.

How to redirect the page when javascript is disable in your browser.


In this tutorial we will see it is possible to redirect the page or disaply the alert message when javascript is disable in client browser.

The answer is YES it is possible to redirect your web page or display the alert message in your web page when javascript is disable in client browser.

For that we will use one tag it is <noscript> to find out the javascript is disable in client browser or not.

Use of <noscript> tag :

The <noscript> tag defines an alternate content to be displayed to users that have disabled scripts in their browser or have a browser that doesn't support script.

You can put the alert message inside the <noscript> tag. This tag will only execute when javascript is disable in client browser.

<noscript>
	<h1>Your browser does not support JavaScript!</h1>
</noscript>

Or you can also redirect the page when javascript is disable in client browser.

<noscript>
	<meta http-equiv="refresh" content="0; url=(Write here page name which you wants to redirect the user)" />
</noscript>

See this below video for better understand.

Post a Comment

0 Comments