diff --git a/htdocs/core/js/lib_foot.js.php b/htdocs/core/js/lib_foot.js.php index cc08af7431f..cfa05289f4b 100644 --- a/htdocs/core/js/lib_foot.js.php +++ b/htdocs/core/js/lib_foot.js.php @@ -29,14 +29,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // 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'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); //var_dump($conf); diff --git a/htdocs/core/js/lib_gravatar.js.php b/htdocs/core/js/lib_gravatar.js.php index 485a57ede88..dad6482460a 100644 --- a/htdocs/core/js/lib_gravatar.js.php +++ b/htdocs/core/js/lib_gravatar.js.php @@ -33,14 +33,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // 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'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); ?> diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index f2aa6fc521f..5b909c6e148 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -32,14 +32,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // 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'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 6900e9b03e7..fa7095c65ac 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -40,7 +40,7 @@ if (! ($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root . '/' || $_SERVER['H // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when. /* session already started into main - session_cache_limiter(false); + session_cache_limiter('public'); header('Cache-Control: no-cache'); session_set_cookie_params(0, '/', null, false, true); // Add tag httponly on session cookie session_start();*/ diff --git a/htdocs/core/js/timepicker.js.php b/htdocs/core/js/timepicker.js.php index 8e67f517b44..38c450b8e23 100644 --- a/htdocs/core/js/timepicker.js.php +++ b/htdocs/core/js/timepicker.js.php @@ -29,14 +29,14 @@ if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML',1); if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); -session_cache_limiter(false); +session_cache_limiter('public'); require_once '../../main.inc.php'; // Define javascript type top_httphead('text/javascript; charset=UTF-8'); // 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'); +if (empty($dolibarr_nocache)) header('Cache-Control: max-age=10800, public, must-revalidate'); else header('Cache-Control: no-cache'); ?> diff --git a/htdocs/modulebuilder/template/css/mymodule.css.php b/htdocs/modulebuilder/template/css/mymodule.css.php index 486d860e7f5..9f3860f1484 100644 --- a/htdocs/modulebuilder/template/css/mymodule.css.php +++ b/htdocs/modulebuilder/template/css/mymodule.css.php @@ -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'); ?> diff --git a/htdocs/public/ticket/index.php b/htdocs/public/ticket/index.php index 52b3b843fa1..ca774aa7bb9 100644 --- a/htdocs/public/ticket/index.php +++ b/htdocs/public/ticket/index.php @@ -61,7 +61,7 @@ if (!$conf->global->TICKET_ENABLE_PUBLIC_INTERFACE) { } else { print '
' . ($conf->global->TICKET_PUBLIC_TEXT_HOME ? $conf->global->TICKET_PUBLIC_TEXT_HOME : $langs->trans("TicketPublicDesc")) . '
'; - print '