I was trying to find a way to prevent browsers from loading a PDF that loads using streaming methods.
FireFox and Chorme do a great job with the following headers and don't cache any pdf file:
Response.AddHeader ("Pragma", "no-cache, no-store"); Response.AddHeader ("Cache-Control", "no-cache, no-store, must-revalidate, max-age = 0"); Response.AddHeader ("Expires", "-1");
Although IE 7 (with acrobat 9.4.1 reader) only works with the following headers and prevents caching of the PDF document:
Response.AddHeader ("Pragma", "no-cache, no-store"); Response.AddHeader ("Cache-Control", "private, must-revalidate, max-age = 0"); Response.AddHeader ("Expires", "-1");
When I tried to use IE 7 with Acrobat Reader 10, the above header did not make any changes and cached the PDF no matter what I tried.
When I try to install Cache-Control: no-cache, no-store, the pdf file was not loaded at all. In my opinion, IE uses a caching mechanism to load PDF documents.
Is there anyone familiar with a global or specific way (e.g. using other headers) that can help prevent caching of PDF documents?
Niv
source share