diff --git a/lib/exe/js.php b/lib/exe/js.php
index b7f2fd2224e9e1781ebdb66eb73c5ad50f8eabda..c929c9ba548b2a22391120327ee40e2a79f131c3 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -31,8 +31,14 @@ function js_out(){
     global $lang;
     global $config_cascade;
 
+    if (isset($_GET['cacheKey'])) {
+        $cacheKey = strval($_GET['cacheKey']);
+    } else {
+        $cacheKey = '';
+    }
+
     // The generated script depends on some dynamic options
-    $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'],
+    $cache = new cache('scripts'.$_SERVER['HTTP_HOST'].$_SERVER['SERVER_PORT'].$cacheKey,
                        '.js');
 
     // load minified version for some files