When something is cached in the browser, unless you refresh the page with the SHIFT+F5 to force the browser to take a new page off the server, images and all, the browser will use the cache copy.

In javascript, you can img.src = "your_image_url.gif?"+ new Date().getTime(); and no doubt you will see this with Math.random() appended which although fine, if the random seed happens to be the same on refresh, then your image is not loading compared to the new Date().getTime() option that is sequential and won't repeat.

If it still doesn't work, then I suggest you check your browser settings to see if you are actually allowing GIF's.