mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-27 04:28:44 +02:00
N°3423 - Allow AttributeImage / AttributeDocument content to be cached by the browser + N°4029 - Caching images in chrome does not work
This commit is contained in:
@@ -1079,9 +1079,15 @@ class ObjectController extends BrickController
|
||||
if ($iCacheSec > 0)
|
||||
{
|
||||
$aHeaders['Expires'] = '';
|
||||
$aHeaders['Cache-Control'] = 'no-transform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec;
|
||||
$aHeaders['Cache-Control'] = 'no-tranjsform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec;
|
||||
// Reset the value set previously
|
||||
$aHeaders['Pragma'] = 'cache';
|
||||
|
||||
// Fix bug in Symphony 3x in Response::sendHeaders() : don't replace header of page except Content-Type
|
||||
header('Cache-Control: no-transform, public,max-age='.$iCacheSec.',s-maxage='.$iCacheSec);
|
||||
header('Pragma: cache');
|
||||
header('Expires: ');
|
||||
|
||||
// An arbitrary date in the past is ok
|
||||
$aHeaders['Last-Modified'] = 'Wed, 15 Jun 2015 13:21:15 GMT';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user