diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index f1d96e49120..5c06842b25d 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -2227,7 +2227,9 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
// Global js function
print ''."\n";
- print ''."\n";
+ if (!defined('DISABLE_LIB_HEAD_JS')) {
+ print '' . "\n";
+ }
// Leaflet TODO use dolibarr files
if (getDolGlobalString('MAIN_USE_GEOPHP')) {