N°3416 XFrame and cache headers optimizations

* Remove XFrame header set in \WebPage::no_cache : not this method responsability, was confusing :/
* Remove no_cache() calls when already set in page constructor (ajax_page mainly)
* Also calls everywhere the \WebPage::no_cache method instead of setting headers manually
This commit is contained in:
Pierre Goiffon
2020-12-02 16:55:16 +01:00
parent 8bfcb14d0c
commit ecebe4ecd5
20 changed files with 44 additions and 68 deletions

View File

@@ -242,7 +242,6 @@ try
{
case 'parser_preview':
$oPage = new ajax_page("");
$oPage->no_cache();
$oPage->SetContentType('text/html');
$sSeparator = utils::ReadParam('separator', ',', false, 'raw_data');
if ($sSeparator == 'tab') $sSeparator = "\t";

View File

@@ -38,7 +38,6 @@ try
require_once(APPROOT.'/application/loginwebpage.class.inc.php');
$oPage = new ajax_page("");
$oPage->no_cache();
$operation = utils::ReadParam('operation', '');
$sClass = utils::ReadParam('class', 'MissingAjaxParam', false, 'class');

View File

@@ -68,8 +68,6 @@ try
LoginWebPage::DoLoginEx($sRequestedPortalId, false);
$oPage = new ajax_page("");
$oPage->no_cache();
$sFilter = utils::ReadParam('filter', '', false, 'raw_data');
$sEncoding = utils::ReadParam('encoding', 'serialize');
@@ -889,13 +887,12 @@ try
case 'chart':
// Workaround for IE8 + IIS + HTTPS
// See TRAC #363, fix described here: http://forums.codecharge.com/posts.php?post_id=97771
$oPage->add_header("Expires: Fri, 17 Jul 1970 05:00:00 GMT");
$oPage->add_header("Cache-Control: cache, must-revalidate");
$oPage->add_header("Pragma: public");
$oPage->add_header("Expires: Fri, 17 Jul 1970 05:00:00 GMT");
$aParams = utils::ReadParam('params', array(), false, 'raw_data');
if ($sFilter != '')
{
if ($sFilter != '') {
$oFilter = DBSearch::unserialize($sFilter);
$oKPI = new ExecutionKPI();
$oDisplayBlock = new DisplayBlock($oFilter, 'chart_ajax', false);

View File

@@ -49,7 +49,6 @@ try
}
$oPage = new ajax_page("");
$oPage->no_cache();
$oPage->SetContentType('text/html');
$sListParams = utils::ReadParam('list_params', '{}', false, 'raw_data');