php - CodeIgniter session issue after sign out browser back button landed to the secured page -


i using codeigniter 2.1.4 in application. if in page require authentication. logout after logout if use browser button me secured page. can view page. if refresh or click on link redirect me login page.

i think it's cache issue? not sure.

include these headers in constructor function of controller prevent caching of previous page

if want code igniter's way of doing it include below code

$this->output->set_header('last-modified:'.gmdate('d, d m y h:i:s').'gmt'); $this->output->set_header('cache-control: no-store, no-cache, must-revalidate'); $this->output->set_header('cache-control: post-check=0, pre-check=0',false); $this->output->set_header('pragma: no-cache'); 

php's way of doing it use below lines of code

header("cache-control: no-store, no-cache, must-revalidate"); header("cache-control: post-check=0, pre-check=0", false); header("pragma: no-cache"); header("expires: sat, 26 jul 1997 05:00:00 gmt"); 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -