Answer the question
In order to leave comments, you need to log in
Is it safe to remove script from DOM?
How do web browsers react to this action? Do all the objects and functions declared in this script remain alive, or are they killed by the garbage collector?
Answer the question
In order to leave comments, you need to log in
Browsers respond normally. You can delete scripts, but there is no benefit in this. All objects will be created and they will hang in memory until someone or something refers to them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question