How to redirect when Javascript is disabled?

by jose_gulgowski , in category: SEO , 8 months ago

How to redirect when Javascript is disabled?

Facebook Twitter LinkedIn Telegram Whatsapp Pocket

1 answer

by dejuan.watsica , 8 months ago

@jose_gulgowski 

You can redirect the user to another page when JavaScript is disabled by using pure HTML and HTTP. To do this, add a <noscript> tag in your HTML code that contains a meta refresh tag with a redirect URL. For example:

1
2
3
<noscript>
  <meta http-equiv="refresh" content="0; URL=http://www.example.com/noscript">
</noscript>


In this example, the user will be redirected to http://www.example.com/noscript if JavaScript is disabled in their browser.