Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem: Server serves old version of image.

 
Girish Gopal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run my web application in tomcat.I have some image files which gets changed frequently.But these changes doesn't get reflected in the jsp's where I show it.

I dont't think its the problem of browser is caching the image file because I have tried clearing the browser,and even tried from a browser of different system.

I also tried to attach a timestamp with the image file so that the cached version is ignored but it was of no avail.


But the changes get refreshed if I restart the server. So I believe something has to be done at the server end.

Any help on it would be appreciated ?

Thanks
Girish
 
Arun Christopher
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Girish,
Put that img tag inside a div and better try reloading the div with ajax calls at regular intevals so that the image gets changed at regular intervals.

-Arun Christopher
 
Girish Gopal
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Arun,

I think U have got me wrong. Its not the problem of refreshing the content in the browser automatically.But the problem is the image doesn't change to new one on doing a manual refresh.

It's not loading the changed image even if I try to access it with a new http request through browser .And Ajax xmlhttprequest's does'nt do anything different ,it request for the resource.

Thanks
Girish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic