Hello in my php projects I have a trick to refresh all scripts. That makes test quite faster, because I don't have everytime to refresh the page, and also for complex iteration I don't have to repeat same steps.
The trick is simply in 2 steps: attach all scripts to header onload , and refresh when I need to see changes , with following function.
Is there something that could help us doing the same thing? some plugin maybe or extension as fas as you know? I couldn't find anything googling
Thanks
function LoadMyJs(scriptName) {
var docHeadObj = document.getElementsByTagName("head")[0];
for (item in docHeadObj.children){
a = docHeadObj.children[item];
tagname = a.tagName;
var src= a.src;
if(!src) continue;
var same =src.indexOf(scriptName);
if(same !=-1){
a = 0;
}
if(tagname =='SCRIPT' && same!=-1) {
delete a;
}
}
var dynamicScript = document.createElement("script");
dynamicScript.type = "text/javascript";
dynamicScript.src = scriptName;
docHeadObj.appendChild(dynamicScript);
}