Real-World Usage of content-visibility

Jeremey Keith uses the little-used CSS property content-visibility to improve the performance on a fairly heavy page.

It works a treat. I did a before-and-after check with pagespeed insights on the page for Out On The Ocean. The “style and layout” part of the main thread work went down considerably. Total blocking time went from more than 600 milliseconds to less than 400 milliseconds.

Not a bad result for a little bit of CSS!

That’s what I’d like to see in more guest writing around here: explanations of real-world implementations to make websites better.

Need to learn about web performance?

Leave a Reply

Your email address will not be published. Required fields are marked *

Did you know?

Frontend Masters Donates to open source projects. $363,806 contributed to date.