You say everything works OK in Netscape if you leave out the
setDateHeader() call. This reminds me of a similar problem I had with
Netscape. It's pretty picky with the date format (it actually expects it
to follow the relevant standard), so toString() of the Date class (which
I suspect your code indirectly uses) won't do. Try to set up a
SimpleDateFormat - it's quite easy. This piece of code works for me:
DateFormat df = new SimpleDateFormat("EEE, dd MMM yy HH:mm:ss z");
df.setTimeZone(TimeZone.getTimeZone("GMT"));
Date now = new Date();
String nowPlus= df.format(now);
// Unfortunately SimpleDateFormat throws in a TimeZone
// of "GMT+00:00", and we only need "GMT". We therefore
// must get rid of "+00:00" like this:
String nowOK = new StringTokenizer(nowPlus, "+").nextToken();
You may of course format all Dates this way.
And, by the way, much as people write JavaScript with if() statements to
treat differences between browser makes, you may wish to generate HTML
and JavaScript for each of the browser flavours right in your JSP code.
The User-Agent header field gives you the information you need to
distinguish.
Not JSP-related:
Netscape is notorious for problems relating to resizing of the window.
The onResize() JavaScript event handler defined for the document object
(i.e., the BODY tag) may get you some of the way.
Regards,
Morten
>
> I was having a very strange caching problem - different from the kind
> normally posted here, and I needed to really understand how caching
> directives are supposed to work.
>
> I was using the following to disable caching in all of my pages:
>
> response.setHeader("Pragma", "No-cache");
> response.setHeader("Cache-Control","no-cache" );
> response.setHeader("Cache-Control","no-store" );
> response.setDateHeader("Expires", 0);
> Date dateInPast = new Date(0);
> response.setDateHeader("ExpiresAbsolute", dateInPast.getTime());
>
--
------------------------------------------------------------------------
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