An older post, but might point you in the right direction:
https://stackoverflow.com/questions/37068359/how-to-force-clean-browser-cache-laravel
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I am displaying a pdf in the web browser using the response helper:
public function view_pdf(Request $request)
{
$full_path = Storage::disk('disk_1')->path('some_pdf.pdf');
return response()->file($full_path);
}
But if I replace the pdf file in that folder with the same name, it would still display the old file because it's saved in the browser's cache. Is there anything to do to send the new file? Maybe a header with the response?
Thanks
An older post, but might point you in the right direction:
https://stackoverflow.com/questions/37068359/how-to-force-clean-browser-cache-laravel
Please or to participate in this conversation.