• Post Reply Bookmark Topic Watch Topic
  • New Topic

Not to cache image-only

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys I'd like to know if it's possible not to cache only some parts of your page. For example, a certain image. I want this in my servlet response. Right now, this is what I have in my response:

response.setHeader("Cache-Control", "no-store");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);
response.setContentType("image/jpeg");

I'm doing this so that whenever a user clicks back the back button, a new image will be generated. Thank you!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!