Reputation: 13
I am working on a cakePHP application. when the user is disconnected and the login page is displayed, if the user click on the back button of the browser, the previous page is always displayed. how to disable it in cakephp ?
Thanks
Upvotes: 1
Views: 991
Reputation: 258
If you want to prevent that then you can disable caching by placing this on your AppController
2.X:
$this->response->disableCache();
3.X:
Cache::disable();
Upvotes: 0
Reputation: 1165
In app/Config/core.php
uncomment line 158, that will give you this:
Configure::write('Cache.disable', true);
Then in your controller function put this:
$this->disableCache();
E.g:
public function pageName(){
$this->disableCache();
}
Upvotes: 1