summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMichael Vickers <michaelvickers.uk@gmail.com>2018-06-09 11:03:03 +0100
committerFrédéric Guillot <fred@kanboard.net>2018-06-11 10:24:35 -0700
commit7c0a1a5fbda41a1d9eb8af86546bd024275b7301 (patch)
treea0d4f88a6627ddfb2f3f1b2bb20a27bb729da30e /app
parent539e2bfd6cefdce6158b29c427d97eabd675e32a (diff)
Defer javascript files by default
Prevent scripts blocking browser HTML parsing. The modern method instead of moving scripts to the end of the body tag as suggested in kanboard/kanboard#3829
Diffstat (limited to 'app')
-rw-r--r--app/Helper/AssetHelper.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Helper/AssetHelper.php b/app/Helper/AssetHelper.php
index dad1448a..c2ab8551 100644
--- a/app/Helper/AssetHelper.php
+++ b/app/Helper/AssetHelper.php
@@ -21,7 +21,7 @@ class AssetHelper extends Base
*/
public function js($filename, $async = false)
{
- return '<script '.($async ? 'async' : '').' type="text/javascript" src="'.$this->helper->url->dir().$filename.'?'.filemtime($filename).'"></script>';
+ return '<script '.($async ? 'async' : '').' defer type="text/javascript" src="'.$this->helper->url->dir().$filename.'?'.filemtime($filename).'"></script>';
}
/**