I'm thinking you have the browser's cache and the server's cache to
worry about, though the server will auto-flush at the set intervals.
one way to defeat caching of html pages is to append a random number
thispage.taf?_function=blah&random=xxx where random is generated by
<@RANDOM>. I'm wondering if the same gimmick could work for image
files. just append a random argument.
On Aug 4, 2005, at 1:20 PM, Bill Conlon wrote:
I know a few people on this list have addressed the issue of
dealing with cached files. Here's my scenario:
I go to an admin page, and get some info on a file stored in the
db. The page includes a thumbnail (also stored in the db), such as:
<img src="download.taf?_uid1=<@COLUMN "thumb_id">
the browser requests and caches the thumbnail image. Response
header for this download is:
http://ccmh3.tothept.com/download.taf?_uID=165
Date: Thu, 04 Aug 2005 19:13:17 GMT
Server: Apache/2.0.54 (Unix) mod_perl/1.99_16 Perl/v5.8.5 DAV/2 PHP/
4.3.10
Accept-Ranges: bytes
content-disposition: inline; filename=spiritofcaring_gray_thumb.jpg
Last-Modified: Monday, 22-Sep-2003 10:48:26 GMT
Content-Length: 5448
Content-Type: image/jpeg
I then upload a replacement file, and in the process, the
application invokes ImageMagick to generate a new thumbnail, and
then displays the same page with updated information. Again the
thumbnail is referenced as
<img src="download.taf?_uid1=<@COLUMN "thumb_id">
but the previous, cached, version appears.
If I force a cache refresh, my new response header looks like:
http://ccmh3.tothept.com/download.taf?_uID=165
Date: Thu, 04 Aug 2005 19:42:50 GMT
Server: Apache/2.0.54 (Unix) mod_perl/1.99_16 Perl/v5.8.5 DAV/2 PHP/
4.3.10
Accept-Ranges: bytes
content-disposition: inline;
filename=thumb_spiritofcaring_logo_gray_sm.png
Last-Modified: Thursday, 04-Aug-2005 12:42:05 GMT
Content-Length: 6681
Content-Type: image/png
The thumbnail info is generally static, and should therefore be
cacheable, but in this case I'm displaying the stale info. Does
anyone know any tricks, or must I instead create an entirely new
URI, giving the thumbnail a new ID?
thanks.
Bill
______________________________________________________________________
__
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf