Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I prevent to store image in browser cache

 
Vinoth Thirunavukarasu
Ranch Hand
Posts: 164
Android Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Anybody tell me. How can I prevent to store image in browser cache. Every time the image should get from server and I should prevent to use images from cache.

Regards,
Vinoth.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To what aim? If your aim is so that a fresh image will be fetched each time because the image is changing, you can serve the image through a servlet and set the no-cache headers (as described the FAQ). If your aim is to prevent the users from saving the images to their local disk, you are out of luck. If the browser can display the image, the user can save it.

So what is your actual goal?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic