Hello, I think you have two possibilities:
* use session_cache_limiter() : you can find the explanation at http://www.php.net/manual/en/function.session-cache-limiter.php I guess you need the 'public' setting. * Add the headers yourself: for example at http://www.php.net/manual/en/function.header.php you can find the headers which are sent to not cache the page. You can add the headers which tell the browser to cache the page. To be honest: it doesn't always work here.. for some reason, IE sometimes still refuses to cache certain pages. Kind regards, Dries Verachtert On Mon, 2002-12-23 at 08:35, Tim Molendijk wrote: > Hi all, > > I'm storing a bunch of images in a MySQL database. I use a small PHP script > to load the appropriate image from database and flush it to the browser. > Because this script flushes in content-type image/jpeg (or similar) it can > be used as IMG SRC. So images can be shown on a webpage using the following > HTML: <IMG SRC="image.php?id=2"> > > This works perfectly fine but the browser (IE) does not cache these images. > On one hand I do understand why -- the image source is a script, not a > static image file, so the browser qualifies the resulting content as > dynamic. On the other hand though: in my setup image.php?id=1 is (as good > as) eternally the same image and for image.php?id=2, image.php?id=3, etc. > the same thing. So it would be no problem if the browser would cache f.e. > image.php?id=1 as if it is a static image. It would even be desirable > because it saves bandwidth. > > So actually the issue is: how can I get browser to cache image.php?id=1 (... > etc.) just as it caches image1.jpg (... etc.)?? The only thing I've thought > of is using mod_rewrite to rewrite URI's like image1.jpg into image.php?id=1 > but I haven't tried it yet -- don't know if it's a logical idea. > > Thanks in advance, > Tim Molendijk > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php