You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#100623 PDF Cache Issues

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Friday, 26 July 2019 09:21 BST

tuan
HI team,

I have a PDF file which is updated/changed every month. We delete the old file and upload a new one with the same filename every month. We keep the filename the same to always have the same pointer.

The issue is that the web browser continues to display the old PDF unless my users clear their browser cache. But this is not a realistic solution as most to all users will not do this.

Is there an option in JCE/Joomla to only display the latest PDF file version on all browsers?

Or is there any other solution I could apply? (I could pay you for custom time)


Thanks

Ryan
Add the following to your .htaccess file :

<filesMatch "\.(pdf)$">
  FileETag None
  <ifModule mod_headers.c>
     Header unset ETag
     Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
     Header set Pragma "no-cache"
     Header set Expires "Wed, 04 Apr 1984 01:00:00 GMT"
  </ifModule>
</filesMatch>

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.