Do not cache a particular image/url

Hi,
I was wondering if it is possible or not. Is there anyway to force the browser to not cache a particular image?

Try adding a random query string (so it reloads the image every time it needs it):

If you’re using PHP:


 <img src="gMyGraphic.png?<? echo time(); ?>">

ook… So time() is not random but it’s guaranteed to be different every time.

The proper way is to make your web server send the appropriate cache control HTTP headers for that image. See the Caching Tutorial for Web Authors and Webmasters for info.

If that’s not possible, you can use the hack Jimmy suggested.

Thanks m8, time() did the trick.

hack php scripts works fine, it’s been around for ages. enjoy