Developer forum

Forum » Templates » Browser not cache specific files

Browser not cache specific files

Per Søgaard
Reply
Hope some one has a solution for this:

Customer links to a number of pdf documents in the files archive.
When new version of the documents are available they are replaced with a new one with the same name.
People downloading gets the old version because of browser cache.

How to overcome this without:
- having to rename files every time and relinking
- slowing the whole site with a browser no cache meta tag

Replies

 
Jais Edelmann
Reply
 Hey Per, you can create a folder for all your PDF's and disable cache for that folder.

  1. Create a folder under your files folder named PDF.
  2. Open the Internet Services Manager (ISM).
  3. Locate the PDF folder under your file structure
  4. Right-click the PDF folder and select Properties.
  5. Select the HTTP Headers tab.
  6. Click Add in the Custom HTTP Headers section.
  7. Add a header named Cache-Control with a value of no-cache.
  8. Click ok to apply the changes.
Hope this will help you on your way, alternatively you could create a script to disable cache for the PDF mime-types if the folder option isent possible in your setup

Best Regards
Jais Edelmann / Codesquare.dk

 

You must be logged in to post in the forum