I have a site which relies heavily on javaScript. I created a mirror site, which has all the JS as well as all the elements that require JS removed. What is a good, easy way to redirect users to the mirror site if they don't have javaScript enabled?
I tried this, but it doesn't seem very good:
<noscript> <meta http-equiv="refresh" content="0; URL=nojs/index.php"> </noscript>
I also tried to putting header-redirect into the noscript tag, but that didn't work.
To redirect from an HTML page, use the META Tag. With this, use the http-equiv attribute to provide an HTTP header for the value of the content attribute. The value of the content is the number of seconds; you want the page to redirect after. Through this, you can automatically redirect your visitors to a new homepage.
“If you need to change the URL of a page as it is shown in search engine results, we recommend that you use a server-side 301 redirect. This is the best way to ensure that users and search engines are directed to the correct page. The 301 status code means that a page has permanently moved to a new location.”
A JavaScript redirect is a piece of JavaScript code that is used to automatically transfer a visitor from a landing page to a different target page.
<noscript> <p>This site is best viewed with Javascript. If you are unable to turn on Javascript, please use this <a href="http://sitewithoutjavascript.com">site</a>.</p> </noscript>
Some people purposely disable Javascript, and you might want to give them a chance to turn it on before redirecting them.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With