I have a page with a searchable table. I have written a "Back" button to go back to the previous page:
<a href="javascript:history.back()">Back</a>
For example, the URL of my homepage is:
https://xxxxxx.com
I enter the page with a searchable table from my homepage (Or any other page):
https://xxxxxx.com/data
When I preform a search, the URL becomes:
https://xxxxxx.com/data?search=*sth*
When I hit the "Back" button, the URL becomes:
https://xxxxxx.com/data
What I actually want is:
https://xxxxxx.com/
(Or the page where the user comes in before /data
)
How can I rewrite my javascript on the search button, so that the Back button can get to the actual page?