A better solution to the caching issues faced. Set jQuery's global Ajax parameter 'cache' to false, and also set the 'Cache-Control' header to 'no-cache'

This commit is contained in:
ninadsp
2010-09-02 21:47:46 +05:30
committed by Marc Delisle
parent 2ff1245ae5
commit aed2e27b3f
6 changed files with 17 additions and 20 deletions

View File

@@ -163,13 +163,10 @@ $(document).ready(function() {
/**
* Set a parameter for all Ajax queries made on this page. Some queries
* are affected by cache settings on the server side, and hence, show stale
* data. Append a random number to tell server that each Ajax request is a
* new one
* data. Don't let the web server serve cached pages
*/
$.ajaxSetup({
data: {'random': function() {
return Math.random();
}}
cache: 'false'
});
/**