jQuery.getScript() does not cache – Jamie Thompson


/ Published in: jQuery
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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. };

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.