|
Hello,
Since
many people are having problems with browser caching, I thought I'd through in
my 2 cents.
I had
problems disabling browser caching in my most recent application. I put
tags galore in my pages to disable the caching to no avail. I was finally
able to disable caching by configuring my web server. I only have personal
experience with Apache on HP-UX and IIS on NT with JRun 2.3.3 build 155, so
YMMV.
Apache
has directives that you can configure in apache.conf to set content
expiration. You can even tune these settings based on MIME type. I
forget the exact syntax, but it was readily findable in the Apache
docs.
Also,
IIS has global content expiration settings in the HTTP Headers panel under
properties for the web site in MMC.
Setting the expiration via webserver configuration
seems to work for me, while programatically setting the Expires (et al.) in the
header did not work. This also takes car of the back and previous
buttons. If the browser tries to load a pages that has expired, the user
will get a message letting him/her know that the page has
expired.
Hope
this information helps. Unfortunately, I can't explain my findings,
but it works for me!
Matthew Lehrian
[EMAIL PROTECTED]
This
is exactly the behavior that the HTTP spec requires. In fact, most
browsers are slightly broken, in that the spec actually says that history and
cache are different and should be kept seperately. However, either way,
the back button should not refresh the page by definition.
You
might be able to accomplish this using Javascript, however
(document.body=????). Depending on how much you care whether you annoy
your users, you could also place a <META HTTP-EQUIV="refresh" CONTENT="10;
url=blah.com/page"> to force a refresh of the page every 10 seconds.
I think that this will function even on a page back (I could be wrong about
that, as I find it very annoying and would never do it).
J
It seems safe to say that the browsers just won't honor
these when it comes to using the BACK/PREV button. They always seem to
grab from cache.
David
----- Original Message -----
Sent: Tuesday, December 28, 1999 8:35
AM
Subject: Refresh Pages when clicking
on the forward or back buttons
Is there a way to force the browser to reload the whole page when
clicking on the forward or back buttons?
We've tried all of the following:
<META HTTP-EQUIV="Expires" CONTENT="10/01/1999 00:00:00
GMT">
<META HTTP-EQUIV="PRAGMA"
CONTENT="NO-CACHE">
<META HTTP-EQUIV="Cache-Control"
CONTENT="no-cache">
<META HTTP-EQUIV="content-type" CONTENT="text/html">
Any suggestions?
Thanks.
|