Clear cache on back press to prevent going back on login page or previous page after logout

前端 未结 1 502
梦如初夏
梦如初夏 2021-01-16 05:26

this is bugging me for a week already. Well I just badly needed to clear the cache of the login page after the user successfully logged in and prevent user from viewing the

相关标签:
1条回答
  • 2021-01-16 06:04

    What about using codeigniter output class, in your controller:

    $this->output->set_header("Cache-Control: no-store, no-cache, must-revalidate, no-transform, max-age=0, post-check=0, pre-check=0");
    $this->output->set_header("Pragma: no-cache");
    
    0 讨论(0)
提交回复
热议问题