确认重新提交表单 在闭幕会话后按后退按钮(注销)



要解决按浏览器后退按钮返回的问题,关闭会话后不会再次启动而不要求输入数据,请添加以下代码。

$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');

但是当我按下浏览器的后退按钮时,我收到消息确认表单重新提交。对不起,我的英语不好

    $this->output->set_header('Last-Modified:' . gmdate('D, d M Y H:i:s') . 'GMT');
    $this->output->set_header('Cache-Control: no-cache, no-cache, must-revalidate');
    $this->output->set_header('Cache-Control: post-check=0, pre-check=0', false);
    $this->output->set_header('Pragma: no-cache');

最新更新