N°3423 - Allow AttributeImage / AttributeDocument content to be cached by the browser (console)

This commit is contained in:
Eric
2021-01-21 10:44:23 +01:00
parent 1fb15a421a
commit 26f800d488
5 changed files with 22 additions and 13 deletions

View File

@@ -58,15 +58,10 @@ try
ormDocument::DownloadDocument($oPage, $sClass, $id, $sField, 'attachment');
if ($iCacheSec > 0)
{
$oPage->add_header("Cache-Control: no-transform,public,max-age=$iCacheSec,s-maxage=$iCacheSec");
$oPage->add_header("Pragma: cache"); // Reset the value set .... where ?
$oPage->add_header("Expires: "); // Reset the value set in ajax_page
$oPage->set_cache($iCacheSec);
// X-Frame http header : set in page constructor, but we need to allow frame integration for this specific page
// so we're resetting its value ! (see N°3416)
$oPage->add_xframe_options('');
$oPage->add_header("Last-Modified: Wed, 15 Jun 2015 13:21:15 GMT"); // An arbitrary date in the past is ok
}
}
break;