• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

image in JSP page

 
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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • 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 ]
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!