Codeigniter pressing logout button and disable the back browser button

前端 未结 4 1264
猫巷女王i
猫巷女王i 2020-12-20 04:03

Hello guys i am using CodeIgniter Framework, i have a problem within after logout, the session is already destroyed and redirect to login form, and after redirecting to logi

4条回答
  •  感情败类
    2020-12-20 04:08

    You are trying to solve the wrong problem: If going back after logout leads to a page full of errors, going to that page directly would cause the same problem.

    This should never occur, instead when someone tries to open a page that should not be opened when not logged-in, the visitor should be directed to the login page.

    Apart from that you should not mess with the user's browser experience. So even you could, you should not disable the back-button. And even if you could, it could probably easily be circumvented by disabling javascript (for example...).

提交回复
热议问题