I have dynamically loaded a javascript by using :
var fileref=document.createElement('script')
fileref.setAttribute("type","text/javascript")
fileref.setAttribute("src", "../scripts/sample.js");
$("head").append(fileref);
Now to remove/unload the script the reverse doesr not work as a script once executed in a browser cannot be removed.
Is there a solution/workaround to this.?