Thursday, February 18, 2010

Clear Image Cache on JSP using Javascript or JSP?

I am re-creating images on every page load, however the old image is still there. Any idea on how to force a clearing of the cache using either Javascript or JSP? Thanks.Clear Image Cache on JSP using Javascript or JSP?
From the JSP side, try appending a few headers to the response.





Response.AppendHeader(';pragma';, ';no-store,no-cache';) // HTTP 1.0





Response.AppendHeader(';cache-control';, ';no-cache, no-store,must-revalidate, max-age=-1';) // HTTP 1.1





Response.AppendHeader(';expires';, ';-1';)
  • girly myspace
  • No comments:

    Post a Comment