History API provides us some useful methods which are used to manipulate the browser history stack.
replaceState() method accepts three arguments which are
url by using these arguments it updates the url without reloading the page.
data: It is an object where we can store some data related to that url.
title: It contains data related to the title of the webpage.
url : The url you need to add.
We can also have
pushState() method which also works similar like
pushState() method creates the new entry into the history stack instead of replacing the old entry.