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

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 Bøhn 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 UTC