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

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.

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

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
> from cache when the back-button is used. (for example IE5 does load it
> cache). I would like to avoid this in some cases, and have the browser
> send a new request so the server could determine if the user is still
> in (ie hasn't clicked any logout button on a page), and if not, show a
> 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 UTC