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:
@@ -16,13 +16,11 @@
|
||||
$(document).ready(function() {
|
||||
|
||||
/**
|
||||
* Set a parameter for all Ajax queries made on this page. Append a random
|
||||
* number to tell server that each Ajax request is a new one
|
||||
* Set a parameter for all Ajax queries made on this page. Don't let the
|
||||
* web server serve cached pages
|
||||
*/
|
||||
$.ajaxSetup({
|
||||
data: {'random': function() {
|
||||
return Math.random();
|
||||
}}
|
||||
cache: 'false'
|
||||
});
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user