diff options
author | Michael Letzgus <www@chronos.michael-letzgus.de> | 2017-06-24 11:35:40 +0200 |
---|---|---|
committer | Michael Letzgus <www@chronos.michael-letzgus.de> | 2017-06-24 11:35:40 +0200 |
commit | c77fe1ab86160ff426ff41375dbb248c70d9f53d (patch) | |
tree | 4d379f0ab211abb0299fe5f8af38d97079160820 /lib | |
parent | 4526b8d6a30ea77e32e767e9b156c1782b5314a5 (diff) | |
download | nextcloud-server-c77fe1ab86160ff426ff41375dbb248c70d9f53d.tar.gz nextcloud-server-c77fe1ab86160ff426ff41375dbb248c70d9f53d.zip |
Optimize performance / Load CSS and JS in parallel on firefox
Move the inline <script> after the external <script> because the internal JS between CSS <link> and external JS makes firefox loading CSS and JS not in parallel.
The internal js is now parsed last but will still be executed first since everything else is deferred js.
Signed-off-by: Michael Letzgus <michaelletzgus@users.noreply.github.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/legacy/template/functions.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/legacy/template/functions.php b/lib/private/legacy/template/functions.php index 208d9fb3f9f..65179a94108 100644 --- a/lib/private/legacy/template/functions.php +++ b/lib/private/legacy/template/functions.php @@ -96,12 +96,12 @@ function emit_script_tag($src, $script_content='') { * @param hash $obj all the script information from template */ function emit_script_loading_tags($obj) { - if (!empty($obj['inline_ocjs'])) { - emit_script_tag('', $obj['inline_ocjs']); - } foreach($obj['jsfiles'] as $jsfile) { emit_script_tag($jsfile, ''); } + if (!empty($obj['inline_ocjs'])) { + emit_script_tag('', $obj['inline_ocjs']); + } } /** |