Answer the question
In order to leave comments, you need to log in
How to block js file reconnection?
Hello.
I have been struggling with the following problem for a long time:
There is a main page with a menu, ajax other pages are loaded into it.
Each loaded page has its own script file.
If I go to the page once, then everything is fine.
If you go to another page and return, the script file will be loaded again and it will turn out that it is duplicated, and when you perform some action on the page, it is executed 2 times. How to determine that this script file has already been loaded and it is unnecessary to load it again?
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