Fix parameter session_cache_limiter

This commit is contained in:
Laurent Destailleur
2018-12-18 15:06:00 +01:00
parent c3eb131054
commit 57c41bac56
10 changed files with 28 additions and 34 deletions

View File

@@ -48,7 +48,9 @@ if (! $res) die("Include of main fails");
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
session_cache_limiter(false);
session_cache_limiter('public');
// false or '' = keep cache instruction added by server
// 'public' = remove cache instruction added by server and if no cache-control added later, a default cache delay (10800) will be added by PHP.
// Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS
/*if (empty($user->id) && ! empty($_SESSION['dol_login']))
@@ -62,7 +64,7 @@ session_cache_limiter(false);
header('Content-type: text/css');
// Important: Following code is to cache this file to avoid page request by browser at each Dolibarr page access.
// You can use CTRL+F5 to refresh your browser cache.
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=3600, public, must-revalidate');
if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate');
else header('Cache-Control: no-cache');
?>