I read that when you don't have access to the web server's headers you can turn off the cache using:
<meta http-equiv="Cache-Control" content="no-store" />
But I also read that this doesn't work in some versions of IE. Are there any set of <meta> tags that will turn off cache in all browsers?
This question is related to
html
internet-explorer
firefox
caching
asp.net-web-api
I noticed some caching issues with service calls when repeating the same service call (long polling). Adding metadata didn't help. One solution is to pass a timestamp
to ensure ie
thinks it's a different http
service request. That worked for me, so adding a server side scripting code snippet to automatically update this tag wouldn't hurt:
<meta http-equiv="expires" content="timestamp">
Try using
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
It doesn't work in IE5, but that's not a big issue.
However, cacheing headers are unreliable in meta elements; for one, any web proxies between the site and the user will completely ignore them. You should always use a real HTTP header for headers such as Cache-Control and Pragma.
pragma is your best bet:
<meta http-equiv="Pragma" content="no-cache">
This is a link to a great Case Study on the industry wide misunderstanding of controlling caches.
http://securityevaluators.com/knowledge/case_studies/caching/
In summary, according to this article, only Cache-Control: no-store
is recognized by Chrome, Firefox, and IE. IE recognizes other controls, but Chrome and Firefox do not.
Source: Stackoverflow.com