I am working on a project in which I have requirement to change the URL after a specific page, because there are some credentials in the URL.
I did that by using location.Replace()
method. It changed the URL in address bar and reloaded the page, but I don't want that.
For example in my URL abc.com/app/XXXX/#/app/inbox
I want to remove XXXX/
on the replacement.
I used location.replace(abc.com/app/#/app/inbox)
. It replaced the url, but also reloaded the page. I don't want my page to be reloaded on URL change.