Perf: Speed enhancement. File can be saved into cache.
This commit is contained in:
parent
fd86f5bf1a
commit
e7b4d34bc9
@ -34,13 +34,24 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1);
|
|||||||
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1);
|
||||||
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1');
|
||||||
|
|
||||||
|
session_cache_limiter( FALSE );
|
||||||
|
|
||||||
require_once("../../master.inc.php");
|
require_once("../../master.inc.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/functions.lib.php");
|
||||||
|
|
||||||
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL by the main.inc.php
|
// Define css type
|
||||||
$langs->load("main",0,0); // We need to load direction but also content to translate 'ExpandAll'
|
header('Content-type: application/javascript');
|
||||||
|
// Important: Following code is to avoid page request by browser and PHP CPU at
|
||||||
|
// each Dolibarr page access.
|
||||||
|
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
|
||||||
|
else header('Cache-Control: no-cache');
|
||||||
|
|
||||||
|
// On the fly GZIP compression for all pages (if browser support it). Must set the bit 3 of constant to 1.
|
||||||
|
if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_SPEED & 0x04)) { ob_start("ob_gzhandler"); }
|
||||||
|
|
||||||
|
if (! empty($_GET["lang"])) $langs->setDefaultLang($_GET["lang"]); // If language was forced on URL
|
||||||
|
if (! empty($_GET["theme"])) $conf->theme=$_GET["theme"]; // If theme was forced on URL
|
||||||
|
$langs->load("main",0,0);
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user