I created a login for logging in, logging out to access the control panel, the scenario is as follows: the user logs in and opens access to the cpanel page, and they log out. Problem: when logging in, if the user clicks the back button "browser, the user will return to the login page, even if authentication is completed and the sessions are established, at the same time, if the user exits and click the" Back "button, he will return to the control panel page (if the user refreshes the page, then all It doesn’t seem fine, and usr will be redirected to the login, and the back button will not redirect it to cpanel).
The problem is in the browser cache, I tried with the php and html meta header to prevent page caching, but I could not succeed. Any solution for this?
My exit action code is as follows:
public function logoutAction()
{
$auth=Zend_Auth::getInstance();
if(!$auth->hasIdentity()){
$this->_redirect('admin/account/redirect');
}
$auth->clearIdentity();
$this->_redirect('admin/account/redirect');
}
source
share