←back to thread

Critical CSS

(critical-css-extractor.kigo.studio)
234 points stevenpotts | 1 comments | | HN request time: 0.237s | source
Show context
oneeyedpigeon ◴[] No.43903048[source]
Feels like premature optimisation to me. Are there really cases where the CSS is so complex or the page loads so many resources that this effort is worthwhile? Maybe with the most complex web apps, I guess, but for almost all cases, I would have thought writing clean CSS, HTML, and JavaScript would render this unnecessary or even counterproductive.
replies(7): >>43903086 #>>43904549 #>>43906407 #>>43907541 #>>43908043 #>>43908178 #>>43928444 #
dimmke ◴[] No.43906407[source]
Seriously. When I look at the modern state of front-end development, it's actually fucking bonkers to me. Stuff like Lighthouse has caused people to reach for optimizations that are completely absurd.

This might make an arbitrary number go up in test suites, at the cost of massively increasing build complexity and reducing ease of working on the project all for very minimal if any improvement for the hypothetical end user (who will be subject to much greater forces out of the developer's control like their network speed)

I see so much stuff like this, then regularly see websites that are riddled with what I would consider to be very basic user interface and state management errors. It's absolutely infuriating.

replies(2): >>43909128 #>>43928484 #
1. stevenpotts ◴[] No.43928484[source]
I know... to be fair, I did test this for my use cases on older phones with throttled slower connections and it did improve the UX but I get what you're saying, I think it also depends on your target audience, who cares if your site is poorly graded by Lighthouse if your user base has high end devices in places with great internet? not even google cares since the Core Web Vitals show up in green