I'm sure many site admins must deal with this sort of problem all the time, but I don't have a really good and simple solution myself.  It is what happens when you overwrite an existing image on the server.  The site visitor's browser still displays the old one and must be refreshed to see the updated image (and stylesheet for that matter).So is there any simple solution to trick the browser to refresh the cache when there's a new image using the old name?  And yes, of course the obvious solution is to rename the image, but please bear with me on this and assume that's not always a good solution...And this is for Drupal sites in case that bears on the question.============================ANSWER: Based on the answer below, I am now using this code:<?phpecho 'niceimage.jpg?'.date(dmHi, filemtime('niceimage.jpg'));?>This automatically updates the image query string whenever the image-file is changed, based on the modification date of the image-file.
Problem with browser caching images
css;drupal;browsers;cache
One common way to do this is to append a query string to the name of the file like this:/images/coolpic.png?randomcharsAppending the query string essentially renames the file so the browser will fetch the file. The query string is obviously useless to an image or stylesheet or other static files so it is ignored and won't break anything.