acha ji





This is a sum up of every previous answers plus an additional solution using HTTP Refresh Header via .htaccess
1. HTTP Refresh Header
First of all, you can use .htaccess to set a refresh header like this
Header set Refresh "3"
This is the "static" equivalent of using the header() function in PHP
header("refresh: 3;");
Note that this solution is not supported by every browser.
2. JavaScript/jQuery
With an alternate URL:
<script>
    setTimeout(function(){location.href="http://example.com/alternate_url.html"} , 3000);
</script>
Without an alternate URL:
<script>
    setTimeout("location.reload(true);",timeoutPeriod);
</script>
Via jQuery:
<script>
    window.location.reload(true);
</script>
3. Meta Refresh
You can use meta refresh when dependencies on JavaScript and redirect headers are unwanted
With an alternate URL:
<meta http-equiv="Refresh" content="3; url=http://example.com/alternate_url.html">
Without an alternate URL:
<meta http-equiv="Refresh" content="3">
Using <noscript>:
<noscript>
    <meta http-equiv="refresh" content="3" />
</noscript>
Optionally
As recommended by Billy Moon, you can provide a refresh link in case something goes wrong:
If you are not redirected automatically: <a href='http://example.com/alternat_url.html'>Click here</a>
Resources
shareimprove this answer
3 
Your "Via jQuery" example doesn't use any jQuery. – Justin Johnson Nov 6 '16 at 7:32
   
Do not call setTimeout with a string. Pass a function instead. – Oriol Nov 28 '16 at 20:07

It would be better to set up a 301 redirect. See the Google's Webmaster Tools article 301 redirects.
shareimprove this answer
4 
The given article link is no longer active. Moved to here: support.google.com/webmasters/bin/… – BuggieboyJun 20 '13 at 15:25 
8 
The question specifically asks for a basic .html page. I guess asker can't modify .htaccess or similar (for instance using Github Pages or similarly limited hosting). 301 is not doable in such cases – Nicolas RaoulAug 2 '13 at 1:24
6 
Ahaha @Buggieboy so funny! The article about redirect has not be redirected... sorry for the inconvenience ;) – Pierre Ozoux Aug 4 '14 at 16:04
   
Link works! Redirecting it is important to ensure you redirect that best handles the SEO component. – MikeDec 29 '16 at 13:56

Comments

Popular posts from this blog

check