Can any one give a working example for history.replaceState? This is what w3.org says:
history.replaceState(data, title [, url ] )
Updates the current entry in the session history to have the given data, title, and, if provided and not null, URL.
Update
This works perfectly:
history.replaceState( {} , 'foo', '/foo' );
URL is changing, but title is not changing. Is that a bug or am I missing something? Tested on latest Chrome.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…