What is the difference between $.ajax();
and $.ajaxSetup();
in jQuery as in:
$.ajax({
cache:false
});
and
To avoid caching, one option is to give different URL for the same resource or data. To generate different URL, you can add a random query string to the end of the URL. This technique works for JQuery, Angular or other type ajax requests.
myURL = myURL +"?random="+new Date().getTime();
JQuery uses the similar technique via $.ajax({cache:false});
and $.ajaxSetup({cache:false});
$.ajax({cache:false})
applies the technique on which it is included, $.ajaxSetup({cache:false});
applies the technique for all AJAX functions.