Jump to content
xisto Community
TavoxPeru

JavaScript Off Redirect Script How to redirect a browser when Javascrip

Recommended Posts

Hi, here's a trick that will redirect a browser when JavaScript is turned off. Why not redirect the ones that have JavaScript? It's because less than 10% of browsers have JavaScript turned off; therefore, is better to redirect less than 10% of visitors than over 90%.

Simply paste this code into the HEAD section of your HTML document.

<script type="text/javascript"><!--/* Created by: Will Bontrager :: http://http://www.willmaster.com/index.php */<noscript><meta http-equiv="refresh" content="0; URL=http://http://ww1.yourdoman.com/;
Best regards,

Share this post


Link to post
Share on other sites

A little thing that you might not to come to think about. One point to remember is that some people run their browsers with "maximum security". It might be the browser itself, personal firewall or that company firewall turned a wee bit to tight. Anyways maximum security browsers might also block meta redirects. For those, create another noscript block to the body part containing a link to the page to be forwarded. And in general... Try to steer away from meta redirects. If you don't need to do clientside processing (here you need to, the noscript) use HTTP headers. Much neater, much more pro and much more firewall friendly.

Share this post


Link to post
Share on other sites

Well, meta redirection got standard for most of the browsers and it is nothing wrong to use it, I just don't understand why people redirect using javascript, it is useful only in some cases, but anyway there are other ways of redirecting, for example with htaccess, but the best way in my opinion would be using headers, which meta tags is the same thing, just HTML. Usually you can send a refresh header, which is the same as a meta tag example on the first post, except server side and a location header, if you use php, you can know more about it on http://php.net/manual/en/function.header.php

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.