Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

image in JSP page

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic