Is there a way for a page to go back a page onload using javascript or php?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP is server side, so no. The page will get to the client and, when it reaches the client, the browser has to be instructed to go back.
That said you have two options. Javascript or HTML Meta Tags.
Javascript mootools example would be something like this:
You can also send it in HTML Meta Tags
Hope it helps! Be aware that this behavior is, generally, confusing to the user and should be used with caution.