0

In .htaccess i have added a "Header set Cache-control" rule and is working fine (most of it) but in iOS this is not working due to the caching in iOS i think. Is there a solution to force refresh the new pdf files?

<IfModule mod_headers.c>
  <FilesMatch ".(pdf)$">
    Header set Cache-Control "max-age=0, public, must-revalidate"   
  </FilesMatch>
</IfModule>
Jordi Nebot
  • 3,042
  • 3
  • 25
  • 40
ARVEE
  • 1
  • Can you show the headers you are setting? – Pekka Nov 25 '16 at 09:07
  • The easiest way to force refresh is to add a random query parameter to the url, `name.pdf?timestamp=11923819032810` – Pekka Nov 25 '16 at 09:08
  • this is my header: Header set Cache-Control "max-age=0, public, must-revalidate" – ARVEE Nov 25 '16 at 09:15
  • I'd try one of the many "disable caching in all browsers" recipes floating around first. E.g. http://stackoverflow.com/questions/49547/how-to-control-web-page-caching-across-all-browsers – Pekka Nov 25 '16 at 09:17
  • How are you downloading the pig ? Thought URLSeesion.dataTask ? – CZ54 Nov 25 '16 at 09:28
  • Thanks. I added a timestamp tot the url. Seems OK now – ARVEE Nov 25 '16 at 21:26

0 Answers0