Answer the question
In order to leave comments, you need to log in
Where to put the js file on the page so that it works for the changed link?
Using the history api, the history.pushState({}, "", href) method I change the link,
I load the content via ajax, and, as it were, a new page,
the js file is on the main page,
if you refresh the page, then js does not work, as I understand from the fact that the link is now different,
what then to do? js file needs to understand that an update is taking place, and not follow the link
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question