There are two pages, and I want to show an alert on the first page when the user comes back from second page to first page.
I know how to go back to first page by: window.location.href
and also by: window.history.back()
.
But I don't know how to show an alert once it's backed?