Replace method, will replace the current page with the one provided in the input parameter. The current page will not be saved in the session, so you won't be able to go back in history using 'Back' button in the browser.
Maybe a little example will clear this up:
in the above example pressing 'Back' button on the browser will go back to http://google.com, because url http://frontbackend.com was replaced with http://frontbackend.com/Frontend without saving history.
Assign method, will redirect to the given URL but it will keep in history original document, so you can navigate to the previous website using 'Back' button.
in the above example pressing 'Back' button will redirect navigation to 'http://frontbackend.com' because assign method will not remove original page from history.
4. window.location.href = url;
Using location.href to redirect to the different document will also keep the browser history just like the assign method.
To simulate user click use location.assign() method or location.href property, this will keep full browser history.
If you want to simulate the HTTP redirect use location.replace() - this will replace the previous item in the history of your browser session.