diff --git a/htdocs/core/js/datepicker.js.php b/htdocs/core/js/datepicker.js.php
index ca85278a1db67272af0856de9289f92ade7c6706..ca5c0fba8f84097d96011eb5974b9ccbb99b945c 100644
--- a/htdocs/core/js/datepicker.js.php
+++ b/htdocs/core/js/datepicker.js.php
@@ -36,6 +36,13 @@ session_cache_limiter(FALSE);
 
 require_once("../../main.inc.php");
 
+// Define javascript type
+header('Content-type: text/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');
+
+
 // Define tradMonths javascript array (we define this in datepicker AND in parent page to avoid errors with IE8)
 $tradMonths=array(
 $langs->trans("January"),