Sessions, Expire-headers and Firefox's back button

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When I begin session with session_start() PHP sets an Expired-header. I
suppose that's fine for the sake of unwanted caching.

Unfortunately, Firefox seem to reload a page that's expired when using
the browser's "Back" navigation instead of showing the page as it was as
the user left it.

This seem to complicate some things. If I create a page with a form, the
user submits it and press "back", the page is reloaded and the form is
wiped instead of preserving the values as they were when the user
submitted/left the page.

I'm curious if there is a simple, acceptable workaround like disabling
the Expires-header?

I'm *not* looking for a solution where the session stores the form
values and insert them into a value attribute. This won't work:
1. There is no way to distinct whether the user pushed "back" or clicked
on a link to request the search page. The variables should be kept in
the first situation but not in the second (and looking at the Referer
header would be considered a hack as well).
2. Users can have multiple windows/tabs open which should not interfere
with the navigation.

It seems like Opera, Internet Explorer, links, lynx and w3m behave more
reasonable. I believe that W3 also states that when using back buttons
browsers should always show the page as when the user left it and not
requesting it at new.

Even if it is a bug in Firefox I would still like to know whether there
is an acceptable workaround that would reduce the number of requests and
make Firefox use the cached page (or cache the page in the first place).

-- 
- Peter Brodersen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux