I use getScript to load dynamically my plugin:
$.getScript(\'js/code.photoswipe.jquery-3.0.4.min.js\', function () { //do magic });
How to disable the cache busting:
$.ajaxSetup({ cache: true });
That will ensure users grab the script from the server only once and from their local cache thereafter (unless their browser settings prevent caching).