0

I am making a web site and I was wondering how I would redirect the user to a different website if Javascript is not enabled. I can't use <noscript> because It needs to redirect. Could I put a meta tag inside a noscript tag? Thx.

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by Kelicula
0

Please find below a meta tag for re-direction,

<meta http-equiv="refresh" content="2; url=http://www.somedomain.com.com/" />

In content attribute you will have to pass two values:
1: time in seconds.
2: the target url.

However I am not sure about browser/platform compatibility of this script.

But hopes this works for you... Good Luck!

Edited by aDevS: n/a

0

The only way I can think to do it would be to have it redirect if they DO have javascript, else they see the regular noscript page. Like so...

<script type="text/javascript">
window.onload = function {
location.href='http://thejavascriptversion.com/page';
return true;
}
</script>

That way if they don't have javascript they never get redirected...
But if they do...wha la!! Off to the js version of your site.

But there's no way to check (client side) if they don't have js, without using...javascript!!

The above plan should get around that though.

good luck!

Edited by Kelicula: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.