When I Defer mootools-more.js jquery.min.js in joomla i start to get errors from javascript. Is there a way to add something to a javascript that after defer the script work normaly? I know there is a good extensions JCH_Optimizer, but i am Nginx user, and gzip_static is on. When i Turn on JCH_Optimizer it will add for me unwonted ttfb because of gziping all the js/css files. With gzip_static on; i get way more faster server response time.

  • Why are you trying to defer Mootools and jQuery?
    – Lodder
    Apr 24 '15 at 10:12
  • I resolve all the problems that was slowing down my website manualy just cant get rid of defer java script gtmetrix.com/reports/www.ekavet.com/oa7eUnrr
    – Donatas
    Apr 24 '15 at 10:17
  • See this and this
    – Lodder
    Apr 24 '15 at 10:20
  • Its a 3rd party extensions that i dont want to use. I prefer to do it manualy. And how to defer javascript in joomla i do know:)
    – Donatas
    Apr 24 '15 at 10:25
  • 1
    There is a way, however it requires a core hack, so I'm not even going to mention it.
    – Lodder
    Apr 24 '15 at 10:27

My answer won't directly answer your question, but will address the concerns of many. The Google PageSpeed Insights is a good tool - however, it is too good, and it requires perfection, which is very seldom achieved on real websites. Case in point: YouTube.com has a score of 54 for desktop, and is failing on mobile. Amazon.com has a score of 50 on mobile and 60 on desktop. Twitter.com has a score of 60 for mobile, and 37 for desktop. We are talking about 3 super major websites here.

Google.com gets a score of a 100, but that is because it is returning a 503 error to the tool, and is asking for a verification code.

I'm not saying that one should completely ignore the score and the advices of Google PageSpeed Insights, but what I recommend is that people shouldn't take it extremely seriously. A score of 80 (even 70) is good, as score of 85 is wow. If you're at the point where you are breaking your website just to make sure you have a good score, then maybe you have gone too far...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.