Internet Explorer (6 and higher) cache and temporary files
How to prevent browser from storing particular page in temporary files folder ? Is there any solution using meta tags ? i've tried with meta tag: pragma, expire, 开发者_开发知识库cache-control but it doesnt work.
Here is the complete set of response headers which ought to work in all browsers:
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
The Cache-Control
is according the HTTP 1.1 specification. The Pragma
is according the HTTP 1.0 specification. The Expires
is to avoid Proxies to cache the content.
If this still fails, then you just need to clear the browser cache before testing.
If still in vain, then the problem lies somewhere else. Common case is that starters think that the included files like scripts, stylesheets and images are cached according the instructions of the parent page. This is thus not true. They all account as independent requests and thus have their own set of controllable response headers.
No, you can't. MSHTML must store the file for some short period of time in order to render it. It is a built-in design requirement.
This question (or more to the point, its answers) should help. I don't think there's any way to be certain that the browser won't write the content to a temporary file (for purposes other than caching), though.
One way I've used in the past is to append a unique value to the query
eg: ImageGen.php?rid=548268
rid being a random gnerated number.
精彩评论