Click to See Complete Forum and Search --> : How to get around a redirect script?


effervescent
08-07-2003, 06:29 PM
Hello all,

So I'm not that experienced with javascript, and I'm in need of some help.

I have a redirect script that I use for all incoming links from our affiliate program, and it works great, but now I'm trying to submit my site to google, and they are telling me that because the user cannot press the back button on their browser to go back to google's site, they will not syndicate my link on their partners pages.

So, I was thinking that I could somehow detect that the back button was pressed and go back 2 pages in the history, effectively skipping the redirect page, and going back to the originating site. Only thing is, I can't seem to figure out how to detect the Back button being pressed. Is this possible, or should I be looking in another direction? I would truly apreciate any responses or thoughts about this.

Thanks,

Mike

pyro
08-07-2003, 10:11 PM
On the page the does the redirecting, use window.location.replace(), It will replace the current page in the history with the new one. This way, uses will be able to click the back button and get back to where they were previously.