Right way to have ASP.NET / IIS NOT cache PDF files

后端 未结 3 1844
天命终不由人
天命终不由人 2021-01-02 06:54

I have the following scenario, and I wanted suggestions on what is the best way to handle this. My web app (ASP.NET 2.0 / IIS 6) generates PDF files, and I have a results pa

3条回答
  •  孤街浪徒
    2021-01-02 06:57

    The fact the clearing your temporary internet files gave you the new version shows the browser is the source of the cache. You could turn iis caching off but that wouldn't stop proxies caching the document. If you need to be 100% sure that the user sees that latest version, I suggest using a query string value to cause the url to be different. The query string could be the pdf generation timestamp.

提交回复
热议问题