What about entity tags
(http://www.w3.org/Protocols/rfc2616/rfc2616-sec13.html#sec13.3.3)?
I would have an auto increment column associated with the thumbnail (or
the source document for that matter) to use an E-Tag instead of
last-modified in the response header of download.taf.
I presume if you provide an entity tag, the User-Agent will have to
re-validate every file, but in most cases would use the cached
resource. Anyone have any experience with this?
On Thursday, August 4, 2005, at 01:45 PM, Bill Conlon wrote:
Thx Scott & Roland. Using &<@RANDOM> will indeed cause the
freshly updated image to be displayed for the admin user that updated
the content.
But I really want the cached items refreshed, so that other users will
get the new thumbnail. I hate the idea of losing the ability to cache,
but I need to think about this.
bill
On Thursday, August 4, 2005, at 01:26 PM, Scott Cadillac wrote:
Hi Bill,
Have you tried:
<img src="download.taf?_uid1=<@COLUMN "thumb_id">&random=<@RANDOM>">
Just have your server-side code ignore the "random" argument.
Works for me.
~ Scott Cadillac
~ 403-254-5002
~ [EMAIL PROTECTED]
~ Custom Software for Business
http://custom.softwarefor.net
~ The XML-Extranet Partnership
~ P.O. Box 69006
RPO Bridlewood SW
Calgary, Alberta
Canada T2Y 4T9
-----Original Message-----
From: Bill Conlon [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 04, 2005 2:21 PM
To: Witango-Talk
Subject: Witango-Talk: HTTP file cache
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
_______________________________________________________________________
_
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf