To avoid caching, one option is to provide a different URL for the same resource or data. To create a different URL, you can add a random query string to the end of the URL. This method works for jQuery, Angular, or other ajax requests of a different type.
myURL = myURL +"?random="+new Date().getTime();
JQuery uses a similar method with $.ajax({cache:false}); and $.ajaxSetup({cache:false});
$.ajax({cache:false}) applies the method to which it is included, $.ajaxSetup({cache:false}); Applies the technique to all AJAX features.
Razan Paul Apr 22 '16 at 5:35 2016-04-22 05:35
source share