I\'m trying to download (and hopefully cache) a dynamically loaded image in PHP. Here are the headers sent and received:
Request:
GET /url:resource/P
Your response headers include Cache-Control: no-store, no-cache
; these prevent caching.
Remove those values (I think must-revalidate, post-check=0, pre-check=0
could/should be kept – they tell the browser to check with the server if there was a change).
And I would stick with Last-Modified
alone (if the changes to your resources can be detected using this criterion alone) – ETag
is a more complicated thing to handle (especially if you want to deal with it in your PHP script yourself), and Google PageSpeed/YSlow advise against this one too.