I have found the following approach useful in the same circumstances:
If you can get your server to add the following header lines to your
responses, also those "normal" (i.e. not servlets, but raw files written
to the connection, such as images, Applets (!), shockwave, etc.), then
you should be all right:
"Pragma: no-cache"
"Cache-Control: no-store"
The first one is accepted by Netscape, the second by Internet Explorer
(they actually adhere to two different protocols, HTTP/1.0 and HTTP/1.1,
respectively).
To be extremely precise, IE (version 4, at least) does recognise the
"Pragma: no-cache" directive, but saves the file in the cache anyway. It
then sends a "If-Modified-Since:" request even for images, which
normally are just read from the cache after a first download during the
session. "Cache-Control: no-store" even keeps it from saving the file in
the cache area - the directive is intended to avid snooping of sensitive
information from the cache.
Regards,
Morten
Matthew Lehrian wrote:
>
> Hello Daniel,
>
> We use the following line at the top of every page that we don't want the
> browser to cache...
>
> response.setHeader("Expires","Tues,01 Jan 1980 00:00:00 GMT");
>
> We actually put it in an include file, and just include it as necessary.
>
> Hope this helps.
>
> Cheers,
> Matthew
>
> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Daniel R�nnqvist
> Sent: Monday, November 29, 1999 9:37 AM
> To: [EMAIL PROTECTED]
> Subject: Browser caches.
>
> Hello, first of all, sorry for this off-topic post, but as I'm developing
> pages in JSP, I thought someone might know a sollution to my problem with
> JSP, HTML or HTTP headers...
>
> Is there a way to force the browser to reload the whole page and ALL of it
> contents (including images) ?
> It can be VERY irritating when I have to go into Internet Explorers menu all
> the time and clear the cache. I've tried the header; <META
> HTTP-EQUIV="Pragma" CONTENT="no-cache">
> but it the browser doesn't really care and still refuses to reload the
> contents of the page.
>
> Please help me with this one!
> with regards, Daniel Ronnqvist
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
--
------------------------------------------------------------------------
Morten Norby Larsen [EMAIL PROTECTED]
Magister Ludi Multimedia Lab Phone: +39 02 26 11 72 80
Via Battaglia 8, I-20127 Milano, Italy Fax: +39 02 26 11 67 33
http://www.magisterludi.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html