Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Cache control in IE" Watch "Cache control in IE" New topic
Author

Cache control in IE

zeberga Amerga
Greenhorn

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("Pragma","no-cache");
response.setHeader("Expires", "01 Apr 1995 01:10:10 GMT");

I really appreciate your sugestions.

Thanks
Zeb
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.


42
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Cache control in IE
 
Similar Threads
Logout page
refresh resubmits form
Internet Explorer is unable to open Office documents from an SSL Web site
Logoff application
response.setHeader("Refresh", "10; URL=http:\\ www.javaranch.com");