File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Cache control in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Cache control in IE" Watch "Cache control in IE" New topic

Cache control in IE

zeberga Amerga

Joined: Jul 13, 2004
Posts: 1
Hi Everyone,

I'm having a problem having IE not cache jsp pages. I'm using this 4 lines at the begining of my jsp but IE still caches the page.

response.setHeader("Cache-Control","no-cache"); //http 1.0
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate");//http 1.1
response.setHeader("Expires", "01 Apr 1995 01:10:10 GMT");

I really appreciate your sugestions.

Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
most likely it's a proxy server somewhere that does the caching...
IE is pretty decent, many proxies are not.

You can try response.setDateHeader("Expires", 0); and see if that works.

I agree. Here's the link:
subject: Cache control in IE
It's not a secret anymore!