Please tell pushState what is the difference between pushState and replaceState ?

  • one
    the same as between adding an item to the box and replacing the item lying on top. - zb '

1 answer 1

pushState adds a point to the story.

replaceState replaces the current item in the history.

Yours sincerely, K.O.

  • thank! вперёд/назад both functions work? - KYRAN
  • @KYRAN Yes. Given: [a, b]. push (c) + back => b, replace (c) + back => a. - Athari
  • Thanks helped - KYRAN