W3C home > Mailing lists > Public > www-talk@w3.org > March to April 2000

Re: Enforce reloading of page when using the back-button

From: Christian Bhn <chrb@online.no>
Date: Wed, 8 Mar 2000 19:20:05 +0100
Message-ID: <00ff01bf892a$f7a09030$5d074382@bohns>
To: "HUI XIONG" <xionghui@comp.nus.edu.sg>, <www-talk@w3.org>
Hi,

I have tried those headers, but without luck. I tried them again after
clearing my browser cache, still not working. I tried your site, and it
worked! The page was reloaded when hitting the back-button. I too agree that
this shouldn't be used normally, but in some cases, especially regarding
security, this would be wanted. As the headers didn't work with me, what
more does your cache-busting technique do?
Thanks!

Christian

> You should use the following three headers together:
>
> Cache-Control: no-cache
> Pragma: no-cache
> Expires: 0
>
> In this way, you can get what you want. As for the problem you
> mentioned, you
> may need to clean up all the pages in the browser cache before you do
> any test.
> I made a test Web site, you may see the effect.
> http://137.132.96.195/vagent
>
> Note: I use Cache-busting techniques only for research purpose. I do
> agree with
> Mr. Dan Connolly. It's not good to use this kind of techniques for Web
> design.
>
> Hui Xiong
>
>
> Christian Bhn wrote:
>
> > Hi,
> >
> > Is there a way to make the browser reload a page from server when the
> > back-button is used. I have tried the "Pragma", "Cache-control" and
> > "Expires" headers, but it doesn't prevent the browser from loading the
> page
> > from cache when the back-button is used. (for example IE5 does load it
> from
> > cache). I would like to avoid this in some cases, and have the browser
> to
> > send a new request so the server could determine if the user is still
> logged
> > in (ie hasn't clicked any logout button on a page), and if not, show a
> not
> > logged in page, rather than the previos content of the page.
> >
> > Is this possible? Thanks a lot in advance!
> >
> > Christian
>
>
>
>
>
Received on Wednesday, 8 March 2000 13:17:52 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 October 2010 18:14:24 GMT