In my web application I am setting window.location
to navigate to a different page, but for some reason Firefox shows an old version of that page.
Usin
just need to tell your download function (in the controller, in case of Laravel) do not cache it by setting the headers, used the following code for Laravel:
$headers =[
'Content-Type' => 'application/text',
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0',
'Cache-Control' => 'post-check=0, pre-check=0, false',
'Pragma' => 'no-cache', ];
return response()->file($pathToFile, $headers);
This code is very much true for PhP as well just need transferring the code accordingly. By adding new dates may invalidate a link especially if you are using a temporarySignedLink etc.
Cheers