Page 1 of 1

PHP Page not refreshing - retrieving from the cache

Posted: Sat Mar 27, 2004 6:29 am
by anjanesh
I have some php pages - all of them have a line print(include("menu.php")); which shows the menu. The menu is dynamic.

menu.php
========

Code: Select all

<?php
$strMenu='some table';
if(isset($PHPSESSID))
 $strMenu.='<td>logout</td>';
else
 $strMenu.='<td>login</td>';
return $strMenu;
?>
When we enter the site at first, it'll be login cell. After loging in, the logout cell shows.
But unfortunately the menu is loaded only once for each page which it looks into the cache to retieve the menu.php.
If I refresh the page the correct menu items get displayed.
My sessions etc are working OK.
I just need to get this fixed. (Perhaps an automatic refresh ? But that'll load all the images all over again.)
Thanks

Posted: Sat Mar 27, 2004 6:45 am
by anjanesh
Regarding the abpove topic :
If I set the option in Internet Options - Settings -

Check for newer version of stored pages :
Every visit to the page
Every time you start IE
Automatically
Never

to
Every visit to the page then it works alright.
But the default is Automatically

So how do I get to refresh that page from the server on every visit ? I thought this only applies to html files. Did not know that php files are also stored in cache.