Could anyone please help me with this? I have a web page using .manifest for offline storage caching. In that page, I use jQuery ajax call to get the data from the server. I
I know I'm very very late to this party but just to put it out there. And I'm sorry to resurrect this question from Zombie land.
In safari and some older browsers, (from what I've experienced till now, cache:false doesn't seem to work sometimes). for a more cross browser compatible solution, you could add a data option to the ajax() call and add a random number generator as a parameter. It would be something like this.
var callback = function () {
$.ajax({
type: "GET",
url: requestUrl,
success: localSuccess,
error: error,
dataType: "text",
//won't work sometimes
cache:false,
//start random number generator
data : { r: Math.random() }
//end random number generator
});
}
This way, everytime a server call happens, a new random number will be generated, and since the data is different from the previous requests, ajax requests wont be cached and will ensure a fresh server call every single time. And in your server, you could ignore this variable r.