if I save location.href as
var h = location.href;
Then perform history.replaceState or pushState in (HTML5) to another href, lets say h2
And if we check h and h2, you will see them equal (in Chrome and Firefox, my IE seems not support HTML5 yet)
ok, my question is:
In this situation, how I know location.href is real or fake (by pushed).
[EDIT]
I add a sample: http://jsfiddle.net/W4bb3/
It seems you can’t at the moment in all browsers. There is the
history.statemethod in firefox:So you can test that the state is not
null, which will be if it was not set viapushState.