diff --git a/lib/exe/js.php b/lib/exe/js.php
index 149b7ab5b79a8ffd086d63e011575a42f4a71051..69b0ba27d99b861eb5403c535c2dd36e9aae3608 100644
--- a/lib/exe/js.php
+++ b/lib/exe/js.php
@@ -153,6 +153,8 @@ function js_out(){
         $js = js_compress($js);
     }
 
+    $js .= "\n"; // https://bugzilla.mozilla.org/show_bug.cgi?id=316033
+
     // save cache file
     io_saveFile($cache,$js);