All I would do is click the URL on the status object so that you can return it back.
So, when you use pushState:
history.pushState( {'previous_url': document.location.href}, document.title, "?some_query_string" );
Then, when you get the state, it will have the previous_url :)
source share