0

this question seems to be more difficult than I thought. I am creating an app, which needs to load different frameworks for different pages. Loading all at once would be an overkill and too expensive in regards of resources. So I basically thought about "unloading" a script / framework. I learned that this is not working as easy as just removing the script tag from the browser, apparently there are some events bound and functions are still available, etc. which are lasting after the script removal. My question is what "features" more than events and functions actually can be loaded with the script and is there an already existing solution to clean them all up somehow?

I am very excited for an answer.

Kind regards, Marius

0

2 Answers 2

-1

Marius when you say load different frameworks are you talking about loading different javascript libraries? If thats the case, then none of the variables or events in the library stay persistent when a new web page is loaded into the browser that doesnt use that library. Cookies and cached data can stay persistent, but that's usually not managed by a library.

Sign up to request clarification or add additional context in comments.

1 Comment

He's not opening a new web page. He's modifying the DOM of the current page by removing the <script> element.
-2

You can try jQuery.getScript if you want to load a JS script ad-hoc.

1 Comment

His question is how to UNLOAD a script.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.