Let the browser measure it
A site built last year with a perfectly good image pipeline was still sending the 1600px file to a phone, and it turned out to be the same missing attribute I wrote a whole post about in 2018.
15 posts filed under Performance, newest first.
A site built last year with a perfectly good image pipeline was still sending the 1600px file to a phone, and it turned out to be the same missing attribute I wrote a whole post about in 2018.
Three years of asking for the same performance work, getting agreed with in meetings, and never getting it scheduled. Then their new operations director asked whether the website had a carbon footprint and the identical list was approved in 2 weeks.
A category page came back from the back button with nothing on it, and every card was already in the DOM at opacity 0, waiting on a scroll event that had come and gone before my script was listening.
I pointed an AVIF encoder at a client's product photography before bed and it was still grinding away at breakfast, which settled the format question for me faster than any benchmark did.
I added lazy loading to every image on a site in about 20 minutes, felt pleased with myself, and then measured it and found the pages were taking longer to show their main content than before I started.
A client stopped in the middle of a status call to say their own site had done the thing where it jumps, which is the behavior I'd been writing into audit documents for them since 2018 with nothing to show for it.
A client's homepage sat blank for a second and a half before it painted anything, and the code holding it there came from the tool they had bought to make the site convert better.
A designer asked in March whether we could add a semibold for the card headings. I said yes inside a minute, on a project where I had written the performance budget myself in January.
A client came back on the consent banner we'd built to ask whether the accept rate could be higher, and it turned out to be the only number anybody asked me for on the entire project.
A full-page cache took the store's category pages from about 2 seconds to 300 ms and broke four things, and all four turned out to be one piece of the header being rendered in the wrong place.
A page on two bars doesn't fail, it just sits there, and that turned out to be the only state where the thing I spent an evening building does anybody any good.
I launched that homepage at 180 KB, it is 2.4 MB now, and the only thing anybody did was change the picture through the form I built for changing the picture.
Every conversation about page weight goes straight to minification. Meanwhile there is a 2 MB image on the page that nobody has opened since Photoshop.
Most of what jQuery was invented to fix has been fixed in the browsers, and a lot of us are still loading the whole library to avoid typing a slightly longer method name.
Every browser has picked a different answer to what should happen while a web font downloads, and all of the answers are bad so the decision quietly falls to you whether you choose to make it or not.