I have a JS single-page app that uses the history API. A user lands on my page and navigates around, and a bunch of pushState
s and replaceState
s happen under the hood. All of the transitions happen in JS, no page reload happens. My question is that how can I detect if the user is back on the first location within my own app, that is, one more back button press will cause the browser to reload the previous page the user was on?
Thanks in advance!