jquery - Difference between $.ajax(); and $.ajaxSetup(); -
what difference between $.ajax(); , $.ajaxsetup(); in jquery in:
$.ajax({ cache:false }); and
$.ajaxsetup({ cache:true }); also, 1 best option?
the following prevent all future ajax requests being cached, regardless of jquery method use ($.get, $.ajax, etc.)
$(document).ready(function() { $.ajaxsetup({ cache: false }); }); you should use $.ajax, allow turn caching off for that instance:
$.ajax({url: "myurl", success: mycallback, cache: false});
Comments
Post a Comment