CodeIgniter Forums
header file not refreshed on logout call - help - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: header file not refreshed on logout call - help (/showthread.php?tid=14231)



header file not refreshed on logout call - help - El Forum - 12-23-2008

[eluser]sidog[/eluser]

UPDATE: Apparently I jumped the gun posting this question. Here's the page in the dx_auth thread that deals with this specifically. (hint, cookies don't expire until the browser is refreshed.)

http://ellislab.com/forums/viewthread/98465/P230/





Goal: Setup my landing page with a header that will either display a login form or show links, depending on the users "logged in" status. (I'm using dx_auth)

Main page controller (partial)
Code:
function index() {

    $this->load->view($this->config->item('header'));
    $this->load->view('main/index');
    $this->load->view($this->config->item('footer'));
        
  }


The header view file (partial)
Code:
if ($this->dx_auth->is_logged_in()) {  
    user links....
}
else {
    login form...
}


Problem: When I logout, the header still displays the navigation links until I refresh manually. I can't figure out why.



Considerations:

- I've set the the http-equiv pragma to 'no-cache' and http-equiv expires content to '0'.

- The "auth/logout" is called, and the user _is_ logged out successfully. The header simply does not reflect these changes.

I'm thinking that the code within the header file is being cached in some way but I can't see where that would be set.

Thanks for any help

- Simon