This method is a useful way of loading new pages if you want to make sure the history list does not get filled up with unwanted pages. This makes the back button more useful to the user.
While the replace goes on, the existing page will continue to be displayed. This also applies if the replace is called during the <HEAD> portion of a page. The new URL is requested but the browser will continue loading and building the previous page until the web server responds and delivers the new replacement page. Termination of the old page therefore happens when the new page begins to arrive and not when it is first requested.