Suppose I have a page open in a browser, and I go to my address bar and enter another page. Then I click the back button to go to the original page. I would like to write Javascript code that can detect this script and respond to it.
As far as I can tell, not a single event ready , onload , nor any embedded Javascript on the page itself is re-executed in this script. Is there anything else I can do?
Cross browser support is important here. JQuery-based solutions are preferred but not required.
Edit for clarity: the navigation I assume is Page A → Page B → back to page A, where I assume that page B may or may not be under my control.
source share