From 12bbef14a685a78c4418037600bfd50b0c31b120 Mon Sep 17 00:00:00 2001 From: Jereme Hancock Date: Mon, 23 Mar 2020 14:04:54 -0500 Subject: [PATCH 1/2] Add the "async" parameter to script tags In my testing this has improved my Page Insights score pretty significantly especially for mobile. See: https://web.dev/render-blocking-resources/ --- bl-kernel/helpers/theme.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index cf74099e..cf0bb857 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -214,7 +214,7 @@ class Theme { $scripts = ''; foreach($files as $file) { - $scripts .= ''.PHP_EOL; + $scripts .= ''.PHP_EOL; } return $scripts; @@ -248,12 +248,12 @@ class Theme { public static function jquery() { - return ''.PHP_EOL; + return ''.PHP_EOL; } public static function jsBootstrap() { - return ''.PHP_EOL; + return ''.PHP_EOL; } public static function cssBootstrap() @@ -269,7 +269,7 @@ class Theme { public static function jsSortable() { // https://github.com/psfpro/bootstrap-html5sortable - return ''.PHP_EOL; + return ''.PHP_EOL; } } From 380e99b1cc0a2ce9bf37c56ce30b56ffee483e38 Mon Sep 17 00:00:00 2001 From: Jereme Hancock Date: Thu, 26 Mar 2020 13:05:18 -0500 Subject: [PATCH 2/2] Removed async from jquery as I started noticing errors in admin --- bl-kernel/helpers/theme.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bl-kernel/helpers/theme.class.php b/bl-kernel/helpers/theme.class.php index cf0bb857..6645d35f 100644 --- a/bl-kernel/helpers/theme.class.php +++ b/bl-kernel/helpers/theme.class.php @@ -248,7 +248,7 @@ class Theme { public static function jquery() { - return ''.PHP_EOL; + return ''.PHP_EOL; } public static function jsBootstrap()