The Etag provided cache validation that works well with FF & chrome, but IE seems to ignore the Etag value and always returns the cached response.
The server response is:
HTTP/1.1 200 OK
Date: Mon, 07 Jul 2014 06:01:57 GMT
Content-Type: application/json
ETag: a7628382056ddd13b7e06991571fd3ad
Content-Encoding: gzip
Content-Length: 4360
when client sends a conditional get request
If-None-Match: 71fb49ecd6f85545693dec0e78ae2131
The request is not sent at all and IE returns the cached response. It transparent when ETag value is the same but a problem when ETag is different.
The only solution that worked for me was adding header
Cache-Control: no-cache
I monitored the network and it forces IE to validate the ETag value.
problem is solved!
However I didn't find any official solution for this problem. I used the post Make IE to cache resources but always revalidate as a reference but most of the information was irrelevant to my problem.
if you have another idea or advise please share
Internet Explorer uses some heuristics for caching responses. You can read more at Caching Improvements in Internet Explorer 9 in the Heuristic Cache Improvements section:
and:
What you want is to bypass these heuristics and force IE to revalidate the content with the server. To do so, please check Make IE to cache resources but always revalidate and its answer. The key headers seem to be:
Bonus: please also see the section about the Vary Improvements in the earlier link:
While it does not say what happens when no
Vary
header specified, it might be worth playing with this value (see this post)