Skip to content
This repository has been archived by the owner on Feb 9, 2024. It is now read-only.

Ability to unload javascript includes? #483

Open
zhuber opened this issue Sep 24, 2019 · 2 comments
Open

Ability to unload javascript includes? #483

zhuber opened this issue Sep 24, 2019 · 2 comments

Comments

@zhuber
Copy link

zhuber commented Sep 24, 2019

If you have an application that allows users to drop in javascript includes, it may pull in third-party scripts that you do not want hanging around in the browser. After testing with this it seems like any js assets loaded in through this system are stored in browser memory and there is no way that I can see to unload them. This is really concerning, given that people can paste in any sort of script and we would then need to trust those scripts to act in a legal manner when staying in the users browser for the entire session.

Is there a way to encapsulate the js includes in such a way that they can be removed when a user changes pages, or we remove the component that originally contained the js include?

@soniar4i
Copy link

Hi @zhuber did you end up finding a solution? I'm facing the same problem while using the library to load external scripts to an SPA.

@brightertools
Copy link

Hi @zhuber & @soniar4i

Is it possible to remove script from the DOM using react? ie remove tracking code from specific pages after its been added?

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants