Jump to content

What is the best way to redirect to other page?


anybody99

Recommended Posts

Yeah... I always do it like this...

 

<script type="javascript">
location.href = '/wherever.html';
</script>
<noscript>
<meta name="refresh" content="0;url=/wherever.html" />
</noscript>

 

That way it defaults to javascript, but if they have it disabled it will use the meta

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

 

Order the tag to refresh

http-equiv="refresh"

 

This specifies the time... so in this case, it will redirect in 2 seconds.

content="2

 

The destination of the redirection.

url=http://yoursite.com">

 

I hope this helped

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.