Can you give me any guidance around modifying Zenphoto's browser caching of images?
Zenphoto does send an etag, which is great... but that still forces the browser to check whether the image is modified each request.
Our best case scenario is to get zenphoto to cache images on the browser permanently by sending a far-future expires header, and change the image's URL when the image is modified (say with a timestamp). Example header:
Cache-Control: public, max-age: 315360000 // one year in seconds
Failing that, we'd like to tell browsers not to check for a new version of an image for a few days, like this:
Cache-Control: public, max-age: 86400 // one day in seconds
The second one we can probably do by creating an extension that uses zp_register_filter. We figure out if the request is for an image and send the Cache-Control header.
So: any ideas on doing #1? Is there a better way to do #2?