I use getScript to load dynamically my plugin:
$.getScript('js/code.photoswipe.jquery-3.0.4.min.js', function () {
//do magic
});
How do I disable caching busting? At the moment it generates numbers at the end: js/code.photoswipe.jquery-3.0.4.min.js?_=1326992601415 I saw this, but not sure how to use it in my case:
$.getScript = function (url, callback, cache) { $.ajax({ type: "GET", url: url, success: callback, dataType: "script", cache: cache }); };
If I call $.getScript multiple times adding the same js file, does it do request each time to get that file? If so, is there a way to check if we already imported that script, so we could avoid calling getScript again for the same file?