I'm using pushState to change the url of a website:
history.pushState("", "info", "/info");
Which works great, but now the back button doesn't work. I believe I need to write my own back and forward button behavior using onPopState that goes through the history stack and renders the appropriate page. The trick is that when "back" is Null, it should do the thing that the back button normally would do (go "back" to the page before the user entered my site).
This seems like pretty standard behavior, is there a recipe / some standard code I could use?