1

I have a Joomla website that I wish to make faster, following the indications given by GoogleSpeed Insight page: "Resources are blocking the first paint of your page. Consider delivering critical JS/CSS inline and deferring all non-critical JS/styles." see also: https://web.dev/render-blocking-resources/.

The goal is to separate the critical resources from the ones that can be deferred, and eliminate the unused code, to speed up the loading of a web page.

I have read some posts (for example: How to get “Coverage” data out from the Chrome Dev Tools and How to get “Coverage” data out from the Chrome Dev Tools) containing interesting suggestions to achieve this goal using the Puppeteer module.

However I have only found examples to analyze automatically the CSS code, but not the JS code. In my website the most relevant delay is due to the evaluation of the java scripts. Could someone write a code snippet that uses Puppeteer to generate a javascript file, which contains only the critical part of the JS code? (possibly the startJSCoverage() and stopJSCoverage() should be used).

Thank you in advance

A. Amori
  • 73
  • 8

0 Answers0