If you have sensitive pages, you can tell the browser not to cache the content, however this will slow the performance if the user regularly loads the same page;
Middleware file NoCacheHeaders
<?php
namespace App\Http\Middleware;
use Closure;
class NoCacheHeaders
{
/**
* Add set no caching HTTP headers.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|array $options
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \InvalidArgumentException
*/
public function handle($request, Closure $next, $options = [])
{
$response = $next($request);
$response->headers->set('Expires', 'Fri, 01 Jan 1990 00:00:00 GMT');
$response->headers->set('Cache-Control', 'no-cache, must-revalidate, no-store, max-age=0, private');
return $response;
}
}
The browsers view it as , you have seen this content, no harm in allowing you to go back. Security advice is to close the session after logging out if you want to prevent someone else looking at the content.