Eduardo,

Yes, I have tried this.  Here is the conclusions that I came to:
1.  If I add
    <HEAD>
    <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
    </HEAD>
to the end of my JSP pages, the pages are not added to the history list in
IE5 browsers (although they stll appear in the back/forward lists), however
the pages still get cached.  I can tell this because when I click on the
Add button on my web page it brings me back a cached version of the
requested page.  They also show up in the Back list.  More details about my
page:
<script language="Javascript">
function displayPatientListFrameSet( form )
{
   parent.location=
"/servlet/GuiControllerServlet?actiontotake=displaypatientlistsplitframe
set";
}
</script>
<head></head>
<body>
 <a href='javascript:displayPatientListFrameSet(document.menu);'><img
src="/images/addbutton.gif" border=0 alt="Add" name="add"></a>
</body>

2.  The only way that I have been able to force the IE5 browser to go back
to the server for every request is by switching the IE5 browser settings to
"Check for newer versions of stored pages: every visit to the page".

3.  Alternatively,  If I discontinue the use of the "location=..." syntax
and instead use something like this instead:

function displayPatientListFrameSet( form )
{
  form.actiontotake.value="displaypatientlistsplitframeset";
  form.target="PatientListWindow";
  form.submit();

  // Stay away from location=... because of the caching problem
  // in IE5!  We can't figure out how to make it such that IE5
  // doesn't cache our JPS pages!
  //parent.location=
"/servlet/GuiControllerServlet?actiontotake=displaypatientlistsplitframe
set";
}

I don't seem to have the same caching problem.

Note: I did not yet try adding the random number to the query string
because for now I chose to try to stick with #3 solution.

Does anyone know why pages would appear in the back/forward lists and not
in the history list?  I thought that these two lists were related?

All comments/suggestions/reponses are encouraged!

Thanks!
Lisa


DID YOU TRY WITH
<meta http-equiv="Pragma" content="no-cache"> AT THE END OF THE FILE ...
It work to me.
<HEAD>
</HEAD>
<body>
....
</body>
<HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</HEAD>

(Yes!, at the end of the file)

Eduardo.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Jim Bailey
Sent: Tuesday, June 06, 2000 11:44 AM
To: [EMAIL PROTECTED]
Subject: Re: IE5 caching of JSP pages, ( using JRUN )


This is from the Microsoft support site. It gives an explanation of two
caching problems.  They reference IE 4 but you might try the suggestions
anyway.

<http://support.microsoft.com/support/kb/articles/Q222/0/64.ASP>
and
<http://support.microsoft.com/support/kb/articles/Q234/2/47.ASP>

This is the supposed mechanism to prevent caching in IE
<http://support.microsoft.com/support/kb/articles/Q234/0/67.ASP>

This is what we do, it seems to work fairly well:

  response.setHeader( "Pragma", "No-cache" );
  response.setDateHeader( "Expires", 0 );
  response.setHeader( "Cache-Control", "no-cache" );

We do this on every page. Another thing that we've tried to vary the query
string by putting some junk in the query string for a URL. This should look
like a new request to the client.

HttpQueryString.addStringArgument(url, "j=" + (int)(Math.random()*1000));

Finally, something someone else posted that we haven't tried:

>From: Sam Heisz [[EMAIL PROTECTED]]
>Subject: Perhaps you should use: Cache-control: private
>...
>response.addHeader("Cache-Control","private");
>
>See RFC 2068 Section 14.9 for information on the Cache-Control HTTP
Header.
><URL:http://www.ietf.org/rfc/rfc2068.txt?number=2068>
>...

This solution is also suggested by the following Microsoft URL:
<http://support.microsoft.com/support/kb/articles/Q189/4/09.ASP>

I'm afraid that even all of this won't always solve your problem. We
recommend that users switch their internet settings on IE to "Check for
newer versions of stored pages: every visit to the page".

-----Original Message-----
From: Lisa Lewis [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 06, 2000 10:44 AM
To: [EMAIL PROTECTED]
Subject: IE5 caching of JSP pages, ( using JRUN )


I am having trouble preventing IE from caching my JSP pages.  I have
wasted an entire day on this.  I have read and tried every relevant post.
Below is a snippet of my code from one of my JSP pages that I would like
the
browser NOT to cache!  I am adding the meta tags in both HTML and the JSP
response headers.  I tried various combinations of this.  I have also tried
to check the 'Set no-cache header on responses' checkbox in the JRUN
administration tool.  This doesn't seem to work either.  I have also tried
adding <meta http-equiv="Expires" content="0"> to the bottom of the JSP
page.
Someone had posted this suggestion as a way to get around a bug in IE5.  I
have not had any luck getting any of these solutions to work.

Note: When I set the response headers, the page doesn't show up in the
history
but it still caches the page because the next time I hit a button to bring
up
the new page, it retrieves the old one.  I am using Javascript:
parent.location=
"/servlet/GuiControllerServlet?actiontotake=displaypatientlistsplitframe
set"
;
...when the button is clicked.

Any advice/suggestions will be greatly appreciated!

Thanks,
Lisa

code snippet:

<%
  // Try to prevent browsers from caching page!!
  response.setHeader("Pragma","no-cache"); // HTTP 1.0
  response.setDateHeader("Expires",0); //prevents caching at proxy server
  response.setHeader("Cache-Control", "no-cache");
  //response.setHeader("Cache-Control", "no-store"); // HTTP 1.1
%>

<html>
<head>

<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Cache-Control" content="no-store">

</head>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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

Reply via email to