EDIT:
Surprise, surprise - the previous solution did not work in IE.
After spending another couple of hours I ended up adding the following to the
blade
template header:<meta http-equiv="cache-control" content="max-age=0" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="cache-control" content="no-store" />
<meta http-equiv="cache-control" content="must-revalidate" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" />
<meta http-equiv="pragma" content="no-cache" />
This seems to work for all browsers.
Furthermore, I had to prevent caching of all AJAX calls. This question provided some very useful answers.
The following does not work in IE:
I've found a solution - not a pretty one in my opinion.
Using a (global after) filter as follows ...
App::after(function($request, $response)
{
// prevent browser caching
$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');
});
seems to force the browser to reload the page from the server.
The answers to this question provided some very useful information.
However, I'm still wondering why other developers do not have the same problem or if they have, how they solve it.
Hiç yorum yok :
Yorum Gönder