通过点击L5中浏览器上的后退按钮,防止退出后退回登录?

Ins*_*hin 2 php caching laravel-5

我的问题是当我已经注销时我想要做的,如果我点击浏览器上的后退按钮它永远不会返回管理主页.

现在,当我点击后退按钮它显示管理员秘密页面,但当我刷新页面然后它回到登录页面.

我解决了它在Laravel 4.2上的filter.php中编写代码

App::after(function($request, $response)
{
 $response->headers->set('Cache-Control','nocache, no-store, max-age=0, must-revalidate');
$response->headers->set('Pragma','no-cache');
$response->headers->set('Expires','Fri, 01 Jan 1990 00:00:00 GMT');
});
Run Code Online (Sandbox Code Playgroud)

但是现在如何通过点击L5中浏览器上的后退按钮来防止退出登录?

Imt*_*bel 10

将此行保留在登录页面的顶部.这将清除缓存并阻止返回页面(pabel)

<?php echo
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
header('Content-Type: text/html');?>
Run Code Online (Sandbox Code Playgroud)