google showing your wrong page? Use this if you dare

partymarty4870

Elite Member
Joined
Jul 7, 2010
Messages
2,032
Reaction score
1,697
Now this comes with no guarantee's - so no whinging if it doesn't work, or has negative effects

This code will redirect your customers to the correct page. I have made a couple of sales today using this. (this site didn't matter much to me though)

Code:
<script src="[URL]https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script[/URL]>
<script>$(document).ready(function() {setTimeout("location.href='http://www.yourredirectedpage.com'", 12000);});</script>

obviously replace the yourredirectedpage.com with where you want them to land and the 12000 is 12 seconds, so set that however long you want.

Again I stress - use at your own risk.
 
Thats miliseconds, 12000=12 seconds as far as i understand

exactly - 12 seconds after page load it'll redirect.

it probably should be set at 1 or 2 seconds - I had my reasons for 12 when I originally used it.
 
there is no need for waiting for document.ready
actually no need for jquery at all

just use this:
setTimeout("location.href='http://www.yourredirectedpage.com'", 12000);
 
you don't need to use set timeout. settimeout is a function used for animations and things like that where you need to continuously call a function every certain number of seconds. Just redirect the page onload.

<script>
window.onload = redirectfunction;


function redirectfunction()
{
window.location = "http://www.newpage.com";
}
</script>
 
Back
Top