Is Internet Explorer using a proxy server? Also, you may want to include in your HTTP headers no caching.
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
Also, if you are using Internet Explorer 5, look at these links to see if you are affected:
Hi Aaron. Thank you for your answer.
IE is not using any proxy. "No caching" is not a solution. I have tried your header but I think the problem is not coming from the cache of the navigator. When I am setting internet explorer cache to "automatically" or "never", the problem seems to be resolved. But some times, on the first loading (with this setting), a picture can be missing.
I have looked your links. It is the contrary. However, the cache could be a solution, I won't know the setting of Internet explorer of the users. That's why I was working in the worst case (setting of cache "Every visit to the page").
I wanted to force the navigator to cache the picture and I have tried that too:
long expireTime = System.currentTimeMillis() + (7 * 24 * 3600 * 1000);
It was the same problem, pictures are randomly missing but less often.
The solution that I have found is completely different. I changed the structure of my web application and put the pictures in an uncompressed war file in the deploy directory. The remaining application stayed in the ear file...
It seems to solve my problem. But it is not very beautiful O_o. I will let you know if I'm finding something better and thank you again for your quick answer ^^.