Does jQuery ajaxSetup({cache: true}) generally work?
- by fsb
jQuery 1.4.2 omits the timestamp GET parameter (to defeat browser cacheing) if I assert the ajax cache setting in the local context:
$.ajax({
url: searcher,
data: keys,
cache: true,
type: 'GET',
dataType: 'json',
success: function(data) {
// something
});
But it includes timestamp if I move the setting out of there and into the global context:
$.ajaxSetup({cache: true});
Moreover, if I let the default apply, jQuery sets timestamp, which doesn't seem to match the manual.
Do you experience the same?
Do HTTP cache control response headers from the server affect this jQuery feature?