Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Uploaded image in cache  RSS feed

 
Tristan Van Poucke
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I upload an image and return to the page the image is presented on, it will show the old image.
I know this is because I upload it with the same name as the old image.
I could solve this by using a different name, but isn't there some other way.
I have tried to use .setLastModified(new Date now.getTime()), but that didn't seem to work.

Any suggestions?
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you close the fileoutputstream of the image file after writing?
Did you disable the browser cache by adding response headers accordingly?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!