Hi there,
Hopefully someone can help me with this one. I have a photo album on my site which I upload thumbnails/images to, with navigation built around a MySql database. Basically, you navigate to an album of thumbnails, and clicking takes you to the full size image – pretty standard stuff.
I’ve recently starting playing around with GD for resizing, and also the concept of protecting the images. Basically, I’m now calling the thumbnails via a script rather than a ‘real’ file location. So, instead of this:
<img src="./glasgow_2002/AA_0_A01-t.jpg"
I have:
src="./thumbnail.php?RollID=glasgow_2002&FrameID=AA_0_A01
thumbnail.php does a couple of things:
1. Checks whether user has correct permissions to view that thumbnail
2. Gets the image (stored outside public document root for security) based on the query variables
3. Resizes the image and spits it out via a Header statement.
That all works perfectly, but my problem is that the browser (IE) does not seem to cache the src retrieved by thumbnail.php. This means that every time you go back to the thumbnails page, they all load dynamically again, and this makes for a poor user experience. Strangely, Opera does seem to cache them fine.
Any suggestions on how to force IE to cache?
Thanks,
David