0

I'm optimizing a website using the Lighthouse. I can see that it doesn't really calculate right the results.

Here are some points I think it's wrong in the calculation.

First, although the website time load around 200ms and as you can see the site loaded on first frame but in the lighthouse, all the values of "First Contentful Paint", "Time to Interactive", "Speed Index", and "Largest Contentful Paint " always are 1.8 seconds for every tests (likes fake number) and it's too high compared with the load time.

enter image description here enter image description here

The "Avoid long main-thread tasks" show the time so big compared with the load time.

enter image description here

Second, I have kept minimum number of the resources and tried to minimize much as much posible the size of the resources, but the Lighthouse still show the suggestion for this one

enter image description here

How can I pass those things?

After read the comment of Graham, I have some answers already. However, even I removed all the JS code and all the image, the "First Contentful Paint" reduces 0.1s and the score still is 99. I'm not sure if Google team considers that the website contains only a line text is popular in the morden website. And of course currently, the PWA is not standard yet and even we use the PWA we still should load for "full state" as well.

Son Le
  • 229
  • 5
  • 16
  • 1
    1) https://stackoverflow.com/a/64792982/2702894 is why you are getting higher load times than you expect. 2) "Avoid long tasks" is due to the CPU throttling that is applied (explained in the answer i linked) meaning that your JavaScript is taking too long to run and blocking the main thread. 3) The third point is just a diagnostic item to help spot issues, it has no impact on your score so you can ignore it. Please keep questions to one thing at a time as otherwise it is hard to make sure we have covered all the points. 3 smaller separate questions are much better than one large one. – GrahamTheDev Aug 20 '21 at 16:01
  • 1
    Let me know if that link answers your question(s) or if there is anything else you need help with. – GrahamTheDev Aug 20 '21 at 16:02
  • Thank you for the comment, if so, how can we reach the 100 score? As you can see, my static resources are really small and I'm testing on my localhost, that mean all conditions are perfect enough already. It's only 6.5kb for the html and around 4.3kb for the css and js, only one image with 17.5kb. I don't think we can optimize more infact for the resources more. Why the criteria for this one so hard. – Son Le Aug 20 '21 at 16:14

0 Answers0