Cache troubles for guests [message #24879] |
Wed, 18 May 2005 11:23 |
akie
Messages: 12 Registered: March 2005 Location: Russia
Karma:
|
Junior Member |
|
|
I think the following code is not clear:
(./inc/include/theme/default/users.inc)
...
if (!($u = ses_get())) {
/* new anon user */
$u = ses_anon_make();
} else if ($u->id != 1 && (!$GLOBALS['is_post'] || sq_check(1, $u->sq, $u->id, $u->ses_id))) { /* store the last visit date for registered user */
header("Expires: Mon, 21 Jan 1980 06:01:01 GMT");
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
header("Pragma: no-cache");
...
It means that for anonymous account the headers mentioned above are not sent (of course, only if web-server does not it itself).
Why they are sent only for registered users?
I have had trouble with my instanse of FUDforum: guest (anonymous) could not see new messages in any forum until he makes his browser to re-request the page. Then I've moved these three lines with "header..." instructions to the beginning of 'inc/src/root_index.php.t' - and everything is ok now.
So, I suppose that it is better to move these three lines, as i did, or remove them all (in this case, cache control will be the web-server administrator's task). Overwise anyone else will have such troubles.
|
|
|