Slava Bizyayev wrote: > On Thu, 2005-06-30 at 22:52, David Christensen wrote: > >>1. Make a mod_perl call that tells the browser not to cache the >> upcoming document. (Does such a call exist?) > > > Take a look at Expires HTTP header. See rfc2616 for additional details.
$r->no_cache(1) is probably simpler :) > > >>2. Make a mod_perl call that tells the browser that the upcoming >> document is newer than the last one requested (I might be able to >> implement this idea using time(), update_mtime(), and >> set_last_modified(), but it seems like a crude hack). > > > Sounds like an unnecessary hack. not necessarily - a bit overblown perhaps, but possibly not an unnecessary approach. say the current image in msie has a newer mtime on disk than the image you're about to redirect to. in that case an internal_redirect will cause apache to use the mtime from the redirected file and apache's default_handler will return 304 - don't forget, internal_redirect is about fooling the browser by giving it content it didn't actually request. if you touch all of your random image files I suspect the image would change. but it all depends on the effect you want within the browser - if you want an image to change on each and every request _to the same url_ then yeah, you need to set no_cache(1) and take possibly other steps to make sure that no conditional headers are sent with the request. othersise apache will send the proper conditional headers for a static file, then msie will cache those headers and use them to decide what it shows the user. HTH --Geoff