-
DOM update on AJAX load
I have a question about a pretty heavily coded jquery application i'm designing. All content is loaded via ajax into div's and most of the pages that are loaded into the div's have their own <script> sections with page specific functions, listeners etc.
I'm curious as the user clicks around from one page to the next, is the DOM updated to remove the <script> that was loaded in from the page when you leave it or does it stick around until you completely refresh the entire page? I can't find a clear answer on this topic anywhere! Thanks for the help/comments,
-
That would be impossible to tell without seeing the page. Even then it might require intensive examination and/or remain elusive. If the code has documentation, it might be in there. Or if the code has an author you can contact, you could ask them.
Generally once a script is loaded in a window, it sticks around until the page is changed or reloaded. However there are ways to remove a script and/or undo its effects.