Forum Moderators: coopster
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); Remember that you must use these header() outputs before you output anything to the browser. Even a blank/space before the header will cause an error (because your webserver then will already have sent some the header).
Or if you have some more time:
[zend.com...]
GET /
GET /img1.gif
GET /img2.gif
GET /img3.gif
And each one returns their own HTTP-repsonse headers.
img that are static, i.e. lie around somewhere on your webspace, usually get served normally by your webserver with the appropiate headers so they will get cached (unless the user overrides a settting in his browser-programm).
If you were to create images on the fly with a script, you would have to make sure your php-script sends the right headers. See my link above on how to do that.
Since in your case you only get the links to the images from the database I assume your files are simply stored on your webserver somewhere below the documentroot. So you don't have to do anything. ;)
Check apache dot org for details on what the extact parameters and settings are. This will make your images _more_ cacheble.
daisho.