Are there any potential issues with caching XMLHttpRequest responses in current browsers that I should take into consideration?
I want to use XMLHttpRequest queries on each page to dynamically load relevant content (such as JSON) or behavior (like eval()ed Javascript), but I want to ensure that the resources received from the server can be cached if the appropriate headers are sent.
I came across an article mentioning that older versions of Firefox may not cache content obtained through XMLHTTPRequest, always requesting new data regardless of server-sent headers. However, since that article is dated, I'm curious about how modern browsers handle caching and whether there are any specific considerations I should keep in mind.
Essentially, I am looking for ways to enable caching of XMLHttpRequest responses for client-side use, where the server provides freshness information and the browser stores a copy of the response along with an expiry date. This allows future requests for the same resource to be fulfilled from the browser cache without contacting the server again. While most major browsers do this correctly, there have been reports that Firefox may not cache XMLHttpRequest content as expected. I'm interested to know if there are any instances where current browsers deviate from standard caching behavior when using XMLHttpRequest.*