S
S
SagePtr2015-03-16 20:33:46
JavaScript
SagePtr, 2015-03-16 20:33:46

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

3 answer(s)
M
Mikhail Goryachkin, 2015-03-16
@SagePtr

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.

O
OnYourLips, 2015-03-16
@OnYourLips

What for? And why not just check?

I
Igor Kravchenko, 2015-03-17
@kravasuper

I don't understand why this is needed?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question