I am using $.getScript to load some of my program code. My code looks something like this:
var mainJs = "/main.js";
$.getScript( mainJs )
.then(function () {
console.log("main.js loaded");
});
The code works fine. However, I am thinking to use Angular-cache to do caching control on it. Is it possible to be done?
I am not sure whether angular is able to interfere the caching of jQuery. But by default
$.getScriptdoesn't cache.$.getScriptis a shortcut of:Reference: http://api.jquery.com/jQuery.getScript/
You need to use: