On Mon, May 21, 2012 at 2:01 AM, hxp <[email protected]> wrote:
>
>> I think you must look at 'Expires:' field in server response header.
>> Browser caches objects (including images) based on this field.
>> If you want your images to be reloaded every time, just make your server
>> to return Expires to any date in the past.
>
> Can you elaborate a little more?
>
> Maybe I should try generating random filenames.

generating random filenames would likely work, but only because it
would be circumventing the real problem.  what the others are
referring to is the `Expires` header sent by your web server to the
browser, ie. the meta information about the image *preceding* delivery
of the image itself.

IIRC, by default, most web servers will try to cache static content
rather aggressively -- in other words it will tell the browser that
the content is unlikely to change for a long time.  you can defeat
this behavior by telling the server to set the `Expires` header to
sometime in the past; this effectively renders the content stale the
moment it arrives.  should the browser need to refresh the
image/content for *any* reason, it *must* request for a new copy.

http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html#100_Prevent_Files_cached
http://httpd.apache.org/docs/current/mod/mod_cache.html
http://httpd.apache.org/docs/current/mod/mod_expires.html

... that should get you going in the right direction.  try using
firebug/chrome-inspector to extract the image headers, and post them
here for review.

-- 

C Anthony

Reply via email to