0

Hello all Joomla StackExchange users, I am developing I site which is particularly complex and uses a lot of CSS and JS assets to work properly. Usually, I would fine tune JCH Optimize to get the work done, but I feel this time I need some extra work in order to get the best load times with this site.

The question is, would JCC configured to remove all JS and CSS and load a single file can be faster/better than fine tuned JCH Optimize?

The plan is simple. For CSS:

  • Build a single non minified CSS file
  • JCC removes all loading CSS
  • Clean/comment out CSS from unused stuff (Dust-Me Selectors)
  • Build CSS Critical Path (and remove this CSS from the main CSS)
  • Minify CSS stylesheet
  • Set the only one minified CSS as non blocking asset.

For JS: - Build a single non minified JS file, without libraries - JCC remove all loading JS - Async load minified libraries from extrenal CDNs (mainly jQuery, jQuery UI in some rare cases) - Minify JS with Google Closure Compiler - JCC serves the one and only JS file.

1

The question is, would JCC configured to remove all JS and CSS and load a single file can be faster/better than fine tuned JCH Optimize?

This question can't be answered. Only if you do both and compare them you will know. But in theory, the scenario you described above does make sense, and in many cases I go a similar way for speed optimization. What and how exactly will work best in practice depends on the exact characteristics of the website and the final implementation.

For example, if you don't need all js/css in every page, it might be better to separate them and exclude them on those pages.

Finally keep in mind, that a fast loading website is not only about satisfying metrics on speed-testing crawlers, but the real user experience. Sometimes trying to reach the highest scores on such crawlers, may result to the opposite.

  • I am not doing this for metrics, but to have a single cached asset for JS and another for CSS for the whole site. JCH Optimize, as far I used it, do not do this. It creates single files for each page, which is good for small-mid sized sites but not for larger sites or if the assets are bigger. – Tilellit Aug 26 '16 at 15:04
0

You can't do this with one single extension, or two... in this case the requirement and the optimization involves more than a simple installation and configuration of extensions.

The answer is not short for some of the points listed, and also depends on your current configuration, both the site and your server.

You've already listed the points that you need to optimize, the best recommendation is to
look one by one the topics but for example the requirement For JS: - Build a single non
minified JS file, without libraries
is not possible from a technical point of view in Joomla!.

  • I plan to achieve the last 'without libraries' point by first unload every JS and then load the ones I want with JCC. – Tilellit Aug 26 '16 at 15:05

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.