user2157063
user2157063

Reputation: 49

asp.net internet explorer pdf cache

I have a hugh problem with the cach function of the internet explorer. I'm trying to develop a way for the internet explorer that it opens every hour a new PDF report but the internet explorer just caches the old version and if the user clicks open it will open the old version. That means that the user has to save first and than open the pdf but we all know that the average user will not understand it so my question is, is there a way to update the file every hours automaticaly?

Just so you know, everything is working fine right now with firefoy and chrome but at the system where this solution should work they are using an old version of ie (8 or 9)

Upvotes: 0

Views: 46

Answers (1)

GNakano
GNakano

Reputation: 26

Modify your htaccess file to include this.

<IfModule mod_expires.c>
  # Enable expirations.
  ExpiresActive On

<FilesMatch ".(pdf)$">
  Header set Cache-Control "max-age=0"
</FilesMatch>

</IfModule>

Upvotes: 1

Related Questions