Reputation: 258
history.replaceState() operates exactly like history.pushState() except that replaceState() modifies the current history entry instead of creating a new one. Note that this doesn't prevent the creation of a new entry in the global browser history.
https://developer.mozilla.org/en-US/docs/Web/API/History_API
Can anyone explain what is global browser history? how is it different from the normal browser history?
Upvotes: 3
Views: 1522
Reputation: 6476
It means history.replaceState()
could add an entry in your browser history (Ctrl+H
on most browsers), though it won't add an entry to current history (i.e. browser back button behaviour)
Upvotes: 2