Posted By

lamebollock on 02/15/11


Tagged

ajax script jquery cache loading


Versions (?)

jQuery.getScript() does not cache – Jamie Thompson


 / Published in: jQuery
 

URL: http://jamiethompson.co.uk/web/2008/07/21/jquerygetscript-does-not-cache/

Cache control when pulling in scripts, redefined "getScript" function

  1. $.getScript = function(url, callback, cache){
  2. $.ajax({
  3. type: "GET",
  4. url: url,
  5. success: callback,
  6. dataType: "script",
  7. cache: cache
  8. });
  9. };

Report this snippet  

You need to login to post a comment.