Open zhuber opened 4 years ago
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.
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
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?