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

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

From: HUI XIONG <xionghui@comp.nus.edu.sg>
Date: Wed, 08 Mar 2000 13:03:53 +0800
Message-ID: <38C5DF38.3F0E8055@comp.nus.edu.sg>
To: www-talk@w3.org
CC: chrb@online.no
Hi 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 00:04:03 GMT

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