$(window).bind(\'statechange\',function(){
var State = History.getState(),
url = State.url;
});
In the following function, url returns th
Try this:
alert(document.referrer);
Note:
The value is an empty string if the user navigated to the page directly (not through a link, but, for example, via a bookmark). Since this property returns only a string, it does not give you DOM access to the referring page.
See more here: https://developer.mozilla.org/en-US/docs/DOM/document.referrer?redirectlocale=en-US&redirectslug=document.referrer