Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The performance metrics in pagespeed/lighthouse etc. are not really assessing performance directly.

You can have a slow, bloated website but great metrics, because you’re doing the “right” things.

However lazy loading images that are not on screen is generally a good thing. Images are typically the heaviest part of a website and loading them only when needed is good.

The article in question acknowledges that, but is criticizing the implementation and failure mode.



> However lazy loading images that are not on screen is generally a good thing.

No. An article should always be loaded in full. I clicked a link to a document, that means i wish to view it. Not half, not the first page, the whole thing. If you have tons of content in a single document, you should probably paginate anyway. Images are usually few, and if not totally unoptimized (which you should do before lazy loading), not a huge drain. By all means, lazy load all the unimportant banners, ads and UI elements. Better still, don't add them at all. Only for infinite scroll would lazy loading make sense, and even then batched by 10-20 ahead (or more), so I don't spend time waiting half a second for each and every image.

The heaviest part is nearly always ads and analytics. Cut those down first.


These days JS is often the heaviest part of a website both in absolute bytes downloaded and the amount of main thread time it consumes


What you say about in terms of comparing download size: This very much depends on the site. It might be that you're right in terms of trends.

I haven't seen any statistical evidence, but from my personal experience a typical website with some images, some JS is often heavier on the image side. Fonts can be large too. PNG are heavy. Videos are the heaviest but rare.

However per byte impact on performance (which is a very vague quality) is very different. Often JS degrades performance more than images.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: