Answer the question
In order to leave comments, you need to log in
How to replace page url without reload?
Hello!
I know there are many topics related to this issue, but it's not that, that's the essence of the issue.
Let's say I have a link on a site, a site on Wordpress - domen/case when I click the link case-name-1 using history.pushState I can navigate through the cases without reloading, but when I reload the page domen/case/case-name- 1 and I already click the link case-name-2 on it, it turns out already porridge - domen/case/case-name-1/case-name-2 how can I make case-name-2 replace case-name-1 .Something similar to react-router-dom
Thank you!
Answer the question
In order to leave comments, you need to log in
try adding links not "case-name-2" but "/case/case-name-2" to history.pushState
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question