It has been some time since I've read the spec, but I believe that
the browsers are free to choose their own implementation for the Back button
and how it interacts with the cache. If I remember correctly, the preferred
(by the spec) implementation is to show the page as it was last viewed by
the user. Netscape does this, if the content is still valid (caches are
invalid due to expiring headers, etc). Since you set the headers Netscape
is performing the way you want it, but IE, in Microsoft's infinite wisdom,
choose to do things a different way. The best way I've found to work with
this is to use the onLoad/onUnload event handlers of the BODY tag along with
some JavaScript variable like firstView. Page generated with variable set
to true, onUnload sets it to false. In the onLoad method, if the value is
false then reload the page. Its pretty straightforward (but you need to
check the exact name of the handlers, my JavaScript book isn't at my desk
right now).
Randy
-----Original Message-----
From: Zsolt Koppany [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 1:24 PM
To: [EMAIL PROTECTED]
Subject: Re: Cache problem with IE
This is the second case but with netscape I don't have any problems.
Randy Layman wrote:
>
> Just to clarify, if your page is a.jsp, do you mean the users
causes
> some request to the server that ends up going to a.jsp, or do you mean the
> user uses the back button (or JavaScript history.back method) to view the
> same page again?
>
> If its the second case, then IE is working correctly - the back
> buttons should view the same instance of the page as was orginally viewed.
> To get around this I would suggest using a JavaScript event handler like
> onLoad that reloads the page.
>
> If its the first case, continue to read the other posts in this
> thread.
>
> Randy
>
> -----Original Message-----
> From: Zsolt Koppany [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 13, 2001 11:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Cache problem with IE
>
> I have the problem under Windows (I don't have Mac).
> My goal is: when the user just comes back to a (JSP) page I want the
> page executed again to show up to date information.
>
> Joe Laffey wrote:
> >
> > On Tue, 13 Mar 2001, Zsolt Koppany wrote:
> >
> > > Hi,
> > >
> > > with the code below I can get netscape not to cache a jsp page but it
> > > does not work with Internet-Explorer.
> > > Does anybody know why?
> > >
> > >
> > > response.setHeader("Cache-Control", "no-cache");
> > > response.setHeader("Pragma", "no-cache");\
> >
> > Mac, or PC? What version? IE Mac has a lot of cache problems. For one,
it
> > will not send a pragma: no-cache header to a proxy even when the user
> > tries to do a super reload. This is a bug that I have reported multiple
> > times. MS claims that this is correct behavior.. uh BS! The PC version
> > will set this header!
> >
> > Joe Laffey
> > LAFFEY Computer Imaging
> > St. Louis, MO
> > ----------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> --
> Zsolt Koppany
> Intland GmbH www.intland.com
> Schulze-Delitzsch-Strasse 16
> D-70565 Stuttgart
> Tel: +49-711-7871080 Fax: +49-711-7871017
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
--
Zsolt Koppany
Intland GmbH www.intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Tel: +49-711-7871080 Fax: +49-711-7871017
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]