How to Defer parsing JavaScript to reduce blocking of page rendering.?

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.
Post Reply
User avatar
darb
Joomla! Ace
Joomla! Ace
Posts: 1308
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden
Contact:

How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by darb » Tue Jan 24, 2017 11:23 am

Hi

do anyone know how to Defer parsing JavaScript to reduce blocking of a Joomla page for rendering rendering? Any tips appreciated though I got this implications from testing a site https://gtmetrix.com/
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben

lextech
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Tue Jan 24, 2017 12:35 am

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by lextech » Wed Jan 25, 2017 11:18 pm

You need to NOT load js above the fold as google says. Simply use async loading for js scripts, plenty of snippets on google for this, as this is not strictly a Joomla problem.

User avatar
stormbyte
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Mar 03, 2015 1:16 pm
Location: paris
Contact:

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by stormbyte » Wed Feb 22, 2017 6:34 am

You can use JCH optimize extension you've inside many options and you can defer the JS also. Check GTMETRIX before JCH then after, you'll see the difference!
Kind Regards, A Joomla fan!
IT Security Consultant https://www.akaoma.com
Cybersecurity Blog https://www.akaoma.com/ressources/blog

User avatar
darb
Joomla! Ace
Joomla! Ace
Posts: 1308
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden
Contact:

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by darb » Mon Mar 13, 2017 1:33 pm

stormbyte wrote:You can use JCH optimize extension you've inside many options and you can defer the JS also. Check GTMETRIX before JCH then after, you'll see the difference!
Seems not working with JCH though https://www.jch-optimize.net/forum/trou ... etrix.html
Success in the long run Its not about the code its about the people and community that's make it!
Its not what you say its what you do that matters!

Darb - aka ssnobben

User avatar
stormbyte
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Tue Mar 03, 2015 1:16 pm
Location: paris
Contact:

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by stormbyte » Mon Mar 13, 2017 1:51 pm

no don't worry it's working fine! your link is showing a user having some trouble many coming from 3rd party extensions.

I'm using it on my website https://www.akaoma.com and there's absolutely no problem since years now! ;) You can check the HTML code with defer option activated on the required lines.

Hope it helps!
Kind Regards, A Joomla fan!
IT Security Consultant https://www.akaoma.com
Cybersecurity Blog https://www.akaoma.com/ressources/blog

the apprentice
Joomla! Guru
Joomla! Guru
Posts: 697
Joined: Wed Nov 18, 2009 3:53 pm

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by the apprentice » Tue Sep 04, 2018 1:04 pm

It's been a while since these advices, still best solutions either using Async and Defer or JCH optimize? At the moment I'm trying the Javascript Async & Defer plugin, let's hope it speeds things up improving parsing and reducing blocking.

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19139
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by leolam » Wed Sep 05, 2018 5:43 am

JCH works as a charm on our own websites. Btw I would use Google Insight for the speedtest. Gives a better picture imho https://developers.google.com/speed/pagespeed/insights/

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team

the apprentice
Joomla! Guru
Joomla! Guru
Posts: 697
Joined: Wed Nov 18, 2009 3:53 pm

Re: How to Defer parsing JavaScript to reduce blocking of page rendering.?

Post by the apprentice » Wed Sep 05, 2018 3:05 pm

leolam wrote:
Wed Sep 05, 2018 5:43 am
I would use Google Insight for the speedtest. Gives a better picture imho https://developers.google.com/speed/pagespeed/insights/
This speed test gives appalling results compared to others, is it only me?


Post Reply

Return to “Performance - Joomla! 3.x”