I’d like to add a back button in my navbar in order to be able to return to the previous page (I want the same behaviour when I click on this button and when I click on my browser’s back button).
I wonder what is the best way to do it ?
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.
All you need to do is add an event listener on your back button and call this code in the handler
window.history.back();