JS Async issue

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
User avatar
dattard
Joomla! Ace
Joomla! Ace
Posts: 1035
Joined: Tue Apr 11, 2006 7:29 pm
Contact:

JS Async issue

Post by dattard » Mon Jun 29, 2020 10:46 am

I've been playing around with my Joomla installation trying to push it to the limits in terms of performance.

My fundamental problem is I want to get a good Core Web Vitals score, but anyway, that's a separate story.

I've used DayCounts plugin that enables defer and async on JS files. When I enabled it though, I could see that the actually output in the scripts is

Code: Select all

asnyc
instead of

Code: Select all

async
When I went into the plugin I could see that the plugin only sets a parameter to enable async, to the problem is not coming from the plugin, but from something even deeper down.

This can be seen in the code below:

Code: Select all

if ($this->params->get('async')) {
                    $debug .= '<li>'.$url.' ==> <span class="label label-success">ASYNC</span></li>';
                    $doc->_scripts[$url]['async'] = true;
                }
Would this be a Joomla core issue or a PHP issue?
https://www.collectiveray.com - We make Joomla and WordPress Easy: Tutorials, Tips and Tricks, Lots of Free Modules incl. Easy Paypal, Popin Window, Random Flash, Google AdSense, Slide Menu (dropdown), 2CO / Paypal payment, [youtube] module, and more!

SharkyKZ
Joomla! Ace
Joomla! Ace
Posts: 1812
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: JS Async issue

Post by SharkyKZ » Mon Jun 29, 2020 11:01 am

I can't reproduce the issue.

User avatar
dattard
Joomla! Ace
Joomla! Ace
Posts: 1035
Joined: Tue Apr 11, 2006 7:29 pm
Contact:

Re: JS Async issue

Post by dattard » Mon Jun 29, 2020 11:10 am

See attachment
You do not have the required permissions to view the files attached to this post.
https://www.collectiveray.com - We make Joomla and WordPress Easy: Tutorials, Tips and Tricks, Lots of Free Modules incl. Easy Paypal, Popin Window, Random Flash, Google AdSense, Slide Menu (dropdown), 2CO / Paypal payment, [youtube] module, and more!

SharkyKZ
Joomla! Ace
Joomla! Ace
Posts: 1812
Joined: Fri Jul 05, 2013 10:35 am
Location: Parts Unknown

Re: JS Async issue

Post by SharkyKZ » Mon Jun 29, 2020 2:20 pm

The issue is coming from ScriptsDown plugin.

User avatar
dattard
Joomla! Ace
Joomla! Ace
Posts: 1035
Joined: Tue Apr 11, 2006 7:29 pm
Contact:

Re: JS Async issue

Post by dattard » Tue Jun 30, 2020 8:15 am

You're right ... there was a misspelling. I fixed it, thanks.
https://www.collectiveray.com - We make Joomla and WordPress Easy: Tutorials, Tips and Tricks, Lots of Free Modules incl. Easy Paypal, Popin Window, Random Flash, Google AdSense, Slide Menu (dropdown), 2CO / Paypal payment, [youtube] module, and more!


Post Reply

Return to “Performance - Joomla! 3.x”