Raghu DV
Raghu DV

Reputation: 258

replaceState() and pushState(): What is global browser history?

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

Answers (1)

Johan Karlsson
Johan Karlsson

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

Related Questions