I think you have to tell the browser the current date too, like this:

Date now = new Date();
                res.setContentType("text/html");
res.setDateHeader("Date", now.getTime());
                res.setDateHeader("Expires", now.getTime());
                res.setHeader("Pragma", "no-cache");
                res.setHeader("Cache-Control", "no-cache");
                res.setHeader("Cache-Control", "no-store");


This code solved all my caching problems on both MAC and WIN for IE/Netscape.

-Henric


----- Original Message -----
From: Claude Zervas <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 12, 1999 10:27 PM
Subject: Re: How to overcome overzealous cacheing by IE4 on Mac ?


At 12:08 PM 3/12/99 , you wrote:
>> IE4 on the Mac seems to ignore all the HTTP headers that
>> relate to cache control.
>> I've set the "Expire" header to the current date or zero, I've
>> set "Pragma" to "no-cache", and "Cache-Control" to "no-cache".
>> These all work fine for Netscape on all platforms, IE3 and IE4
>> on Windows, and Opera. But IE4 on the Mac caches dynamically
>> generated pages fairly consistently no matter what.
>>
>> Does anyone know if there are other cache control headers
>> that may be pertinent ?  Or is IE4/Mac basically buggy ?
>
>Have you tried expiring the page to sometime in the past?
>It's a kludge, but perhaps that would keep the MacOS IE
>from caching the pages.

Yes, I've called response.setDateHeader( "Expires", 0 ), which
is effectively in the past, without success.

As Arif mentioned, it looks like the only way to do this is to add
a unique key to each query to fool the browser. Unfortunately, this
requires URL rewriting which is a pain if you have any static pages
with URLs to active content in them....

This really does look like a bug in IE. What is even stranger is that
even if the user turns off caching in the browser preferences it
still caches some pages !!!  I guess Microsoft always knows best...

Thanks,
- Claude

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to