Set the Following before sending any content,
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-cache");
response.setHeader("Pragma","no-cache");
response.setDateHeader ("Expires", 0);
This prevents caching.
Additionally the Servlet engine may also be configured
to cache the page. Check for this also in the confog
files.
--- "Karau, Joe" <[EMAIL PROTECTED]> wrote:
> It may not be the browser's fault in this particular
> instance. It is
> possible that the webserver, or a proxy is caching
> the page. I believe
> setting the header to something like Expires=0 will
> turn off proxy caching
> (not sure about that one, should double check).
> Depending upon the server
> you are using it may not be possible to eliminate
> the caching of pages. I
> have not seen that in any production quality
> webserver, however we use IBM's
> VAJAVA's WebSphere test environment, and the pages
> always get cached in
> development, but when we deploy the no-cache
> settings work fine.
>
> Joseph Karau
> Kingland Systems
> [EMAIL PROTECTED]
> 507-536-3629
> AIM: jkara3629
>
>
> -----Original Message-----
> From: Ruaidhrí Fernandes
> [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, May 23, 2001 7:31 AM
> To: [EMAIL PROTECTED]
> Subject: CACHE CONTROL EXAMPLE
>
>
> Hi all,
> still having problems with this one.
> Can anyone show me a simply WORKING example of JSP
> code telling the IE5 browser not to use cached pages
> and to reload the page if the user presses the back
> button.
> Ive tried everything and no success.
> Help would be very welcome.
> Thanks
> Rui
>
> =====
> "If a rabbit's foot is so lucky,..... what happened
> to the rabbit?"
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great
> prices
> http://auctions.yahoo.com/
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff
> JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body:
> "set JSP-INTEREST
> DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body:
> "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets