$(window).bind('statechange',function(){
var State = History.getState(),
url = State.url;
});
In the following function, url returns the current URL. What I'm looking for is, within that function, to get the previous URL, so for example, if I'm on /cars/ferrari
and go to /cars/ford
, url
would return cars/ford
, but I want to get /cars/ferrari
.
How do I get the previous URL within a statechange
event?