Pure HTML Back Button

You can do it “without using JavaScript” just in case the previous page is known in advance, i.e. you are in a “detail” page and the “back” button will bring you to the “list” or home page, e.g.:

<a href="home">Back</a>

Else, if the previous page changes dynamically you need to use JavaScript history.back method:

<a href="javascript:window.history.back();">Back</a>

Leave a Comment