I was trying to find a way to prevent browsers from caching PDF that is being loaded using a streaming methods.
FireFox and Chorme deals just fine with the following headers and doesn'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 reader 9.4.1) works only with the following headers and prevent the caching of the PDF doc:
Response.AddHeader("Pragma", "no-cache, no-store"); Response.AddHeader("Cache-Control", "private, must-revalidate, max-age=0"); Response.AddHeader("Expires", "-1");
When i was trying to use IE 7 with Acrobat Reader 10, the above header didn't make any different and cached the PDF no matter what i tried.
When i am trying to put Cache-Control: no-cache, no-store, the pdf was not loaded at all. According to my understanding, IE use the cache mechanism to load the PDF documents.
Is there anyone familiar with a global or specific way (by using other headers for example) that can help prevent caching of PDF documents?