I have a nifty jpeg upload handler for my community website (php, apache server) where users can upload jpeg's for their profile page (with filesize and dimension limits)..and it works fine.

Expect when the users go to their profile again (or maybe click on the back button), the picture doens't upload until they refresh their browser (F5).

I COULD use some dodgy php and append a random number to the jpeg to prevent caching (i.e. "filename.jpg?=".rand() )
or i could use headers or meta tags to prevent caching.

But I don't really want the image NOT to cache ALL the time, that's bad for bandwidth....i just one the image to NOT cache when the user changes it.

Any ideas?

many thanks.