mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
Force clients to ask us if their cached JS is valid
This commit is contained in:
parent
439218869b
commit
1ada53539c
@ -129,7 +129,7 @@ class JavaScript
|
|||||||
$request = Icinga::app()->getRequest();
|
$request = Icinga::app()->getRequest();
|
||||||
$noCache = $request->getHeader('Cache-Control') === 'no-cache' || $request->getHeader('Pragma') === 'no-cache';
|
$noCache = $request->getHeader('Cache-Control') === 'no-cache' || $request->getHeader('Pragma') === 'no-cache';
|
||||||
|
|
||||||
header('Cache-Control: public');
|
header('Cache-Control: public,no-cache,must-revalidate');
|
||||||
|
|
||||||
if (! $noCache && FileCache::etagMatchesFiles($files)) {
|
if (! $noCache && FileCache::etagMatchesFiles($files)) {
|
||||||
header("HTTP/1.1 304 Not Modified");
|
header("HTTP/1.1 304 Not Modified");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user