Re: Picture Cache

From: Date: Thu, 04 Jul 2002 22:15:58 +0000
Subject: Re: Picture Cache
Groups: php.general 
Request: Send a blank email to php-general+get-105528@lists.php.net to get a copy of this message
> <img src="getdata.php?id=6"> > > Thats great and it works fine, but I feel that it does not cache >the picture in the web browser? I don't know how the cache works but my Normally, using ? in a URL indicates that the content is dynamic. So the browser's assumption is that getdata.php?id=6 is not worth caching, because it's going to change anyway. There are things you can do to fix this: 1. Use getdata.php/6 and then use $PATH_INFO (I think that's it) in your getdata.php script to find out which image they want. 2. In your PHP script, do header() for the Expiration date, so that the browser knows the image can be cached for the next N days or whatever you think is good. Be warned -- That means if you change an image, people will be seeing the old one for at least that long... -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#105528) next »