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.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
User avatar
darb
Joomla! Hero
Joomla! Hero
Posts: 2042
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden

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/

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: 86
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! Hero
Joomla! Hero
Posts: 2042
Joined: Thu Jul 06, 2006 12:57 pm
Location: Stockholm Sweden

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

User avatar
stormbyte
Joomla! Intern
Joomla! Intern
Posts: 86
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: 801
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: 20652
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ 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 Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

the apprentice
Joomla! Guru
Joomla! Guru
Posts: 801
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?


Locked

Return to “Performance - Joomla! 3.x”