lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

First Contentful Paint (FCP) and Largest Contentful Paint (LCP) incorrect values when tested with mobile device

Open thanhtoan1196 opened this issue 5 years ago • 2 comments

Provide the steps to reproduce

  1. Run LH on https://test11zz.com (Mobile Device)
  2. Check result
  3. Click View Original Trace to show Timings

What is the current behavior?

First Contentful Paint (FCP) and Largest Contentful Paint (LCP) have a big difference between the result and Original Trace

image

image

What is the expected behavior?

First Contentful Paint and Largest Contentful Paint have the similarity between the result and Original Trace

Environment Information

  • Affected Channels: DevTools
  • Chrome version: 87.0.4280.88 (Official Build) (x86_64)
  • Operating System: MacOS 11.0.1

thanhtoan1196 avatar Jan 02 '21 03:01 thanhtoan1196

Hi, I'm just a regular Lighthouse user but not long ago was also curious about this. And found out that there's hint you can see when hover over View Trace button. Similar question was already raised and answered on some of the thread. image

BUT. Your site does have an issue with too long LCP and I had the same one. My advice for you - change the logic of tile generation on BE-side to deliver non-lazy-loaded picture\img tag markup for every 1st tile. And that solved my issue too. The problem is that lazy-loading comes into play only after all client JS is loaded, it replaces all src attributes, browser downloads it and only then user sees the image in viewport. And the Largest Content Paint, in fact, is you Image tile in every viewport. Other solution as a workaround (if you have no access\skills for Back-End) - set some non-lazy-loaded banner that is at least 5% bigger (just calculate Width x Height in pixels) than your img tile in viewport. That will draw "LCP's attention" to that banner that will be regular picture tag that is loaded almost instantly without lazy-loading. Good luck!

alexd-3d avatar Jan 03 '21 17:01 alexd-3d

Thanks for filing @thanhtoan1196!

@alexd-3d is exactly right. The difference is in simulated throttling and covered in this FAQ.

patrickhulce avatar Jan 04 '21 16:01 patrickhulce