S
S
Sergey Suntsev2018-10-04 17:01:50
JavaScript
Sergey Suntsev, 2018-10-04 17:01:50

How to change the last browser history setting?

There is a Spa application, which is a personal account of the site.
If we go from the site to our personal account, we will first go to the profile/ page, and then a redirect will occur, depending on the presence of a token in the cookie, and if it is, then depending on the user's role, to a specific page.
The question is, is it possible to make it so that when we press the back button, we go not to the profile/ page, but to the site itself, i.e. change the last story?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Osher, 2018-10-04
@GreyCrew

Replace pushState with replaceState

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question