Prevent ie caching pdf




















The techniques we suggest above almost always work. But remember that the headers you can set on the Web server are merely asking the browser to do something.

They can't force the browser to do something it doesn't want to do. A common Internet complaint is that a small handful of browsers or "proxy caches" don't cache things properly no matter what you do, due to bugs or misconfigurations.

The tips above will work in almost all cases, but the nature of the Internet means you can't guarantee it will always work the way you hope. It's possible for technically advanced customers to change how Web browsers cache the files. On this page: Setting a short cache time Controlling which files are affected Your script may already do this for you Try to avoid "no-cache" FastCGI and subdirectories You can't control everything Setting a short cache time By asking the Web browser to only cache the file for a very short length of time, you can usually avoid the problem.

Controlling which files are affected Disabling browser caching will slow down your site and increase the amount of bandwidth your site uses, because repeat visitors will always connect to your site to re-download files they would otherwise cache. Your script may already do this for you If you use a script to generate your Web pages, it may already include appropriate headers to prevent page caching. So, servers should use the Cache-Control header sparingly.

In most cases, the use of Expires: -1 is preferred. Unfortunately, legacy HTTP 1. For purposes of backward compatibility with HTTP 1. However, the Pragma: no-cache header wasn't for this purpose. According to the HTTP 1. It's intended for proxy servers that may prevent certain important requests from reaching the destination Web server. For future applications, the Cache-Control header is the proper means for controlling caching. Pragma: no-cache prevents caching only when used over a secure connection.

The page will be cached but marked as immediately expired. When the Cache-Control header needs to be used on non-ASP pages, it may be necessary to use options in the server configuration to add this header automatically. For the process of adding HTTP headers to server responses for a particular directory, refer to your server document. For example, in IIS 4, follow these steps:. It's not a good idea to use this header globally across the entire Web server.

Restrict its use purely to content that absolutely mustn't be cached on the client. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Ask Question. Asked 11 years, 6 months ago. Active 9 years, 9 months ago. Viewed 4k times. We're using the following Java code which prevents caching in Firefox but doesn't work in IE 8: response.

Improve this question. Mike Davison Mike Davison 61 1 1 silver badge 3 3 bronze badges. You know, I can't believe I forgot to mention that! Add a comment. Active Oldest Votes. When you say "caching" you mean "Writing the document to the disk"? Improve this answer. EricLaw EricLaw Thanks Eric. Your understanding of my issue is spot on.



0コメント

  • 1000 / 1000