I recently came across an issue with IE
caching responses from ajax requests. My ajax code would send an
HTTP GET request if the querystring was less than 2067 characters and a
HTTP POST if the query data was larger. When IE caching was set
to Check for newer versions of stored pages:
automatically, IE would cache the GET web response. Changing the
ajax code so that it always performed HTTP POST requests fixed the
weird issues I was seeing (related to requests being cached).
IE properly caches GET requests but doesn’t cache POST requests.
So, I could have either altered the url of the GET request to be unique
everytime or I could have set the “Expires” header to -1. I chose
to just use POST requests since I don’t want them to be cached
anyway. More information can be found on the wikipedia page.
Anyway, hopefully this will help someone that runs into the same situation.