Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

image in JSP page  RSS feed

 
sitaram irrinki
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing a problem with image expiry, I have an
image in my jsp page which is not getting expired in
browser cache, even if I set the no-cache in 'PRAGMA'
or 'CACHE-CONTROL' or if I set 'EXPIRY' header only
the html page on the browser cache is getting expired
but not the image, as a result only the html/jsp page
is getting downloaded from the server but not the
image. So even if I change the image on the server the
browser is displaying old image from it's cache.
how can I solve this problem
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way that's a bit clunky but very reliable is to add a unique query string to the end of the image url (a timestamp works nicely)



It would be a lot less clunky if you moved the scriptlet code into a custom tag.
[ September 27, 2005: Message edited by: Ben Souther ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!