Any of the currently popular browsers have special caching problems * XMLHttpRequest answers that I need to know about?
I would like to be able to include XMLHttpRequest requests on each page as a method of dynamically loading content (e.g. JSON) or behavior (e.g. eval () ed Javascript) per page type, but I want to make sure that the resources it receives from the server can be cached if the server sent the correct headers.
I was interested in reading this article, which mentions that browsers such as Firefox 1.1 do not cache content received through XMLHTTPRequest, and that it always sends new data requests (with Cache-Control and without If-Modified-Since), regardless of the headers sent by the server.
Obviously, the article is very old - I donβt even remember Firefox 1.1; so what kind of considerations do I need to do for popular popular browsers, and are there any tricks when I specifically want the answers to be cached?
** To clarify my question about caching, I mean client-side caching, where the server gives information about freshness (in the form of the Cache-Control: max-age directive or the Expires header :), and the browser stores a copy of the response in the cache along with expiration date, so that future requests for the same resource issued from the following pages can be satisfied from the browser cache without the need for any contact with the server. All major browsers do this correctly for most content, but I heard that Firefox cannot do this for XMLHttpRequest content. I ask if anyone knows of cases where some of the modern browsers do not cache specification responses when using XMLHttpRequest. *
thomasrutter
source share