aspose file tools*
The moose likes JSP and the fly likes How can I prevent to  store image in browser cache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How can I prevent to  store image in browser cache" Watch "How can I prevent to  store image in browser cache" New topic
Author

How can I prevent to store image in browser cache

Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

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.


Java Best Practices
Linux Best Practices
Amortization Calculator

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61662
    
  67

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I prevent to store image in browser cache