A great post by Ire Aderinokun on how to use the Lighthouse CLI to test your website against a performance budget using a .json
file.
Journal
Tagged: performance
AddyOsmani.com - Native image lazy-loading for the web!
I’m excited to see that native lazy-loading of images and iframes is going to land in browsers.
Chromium Blog: Chrome Lite Pages - For a faster, leaner loading experience
This sounded like another flavour of AMP to me, especially when I read this:
We use built-in optimizations and Google servers to improve page loading.
At least Google clarifies:
Lite pages are only triggered for extremely slow sites, so we encourage developers to measure how well their pages are currently performing over slow networks.
Cache-Control for Civilians – CSS Wizardry – CSS Architecture, Web Performance Optimisation, and more, by Harry Roberts
Harry explains Cache-Control headers and directives with use cases and cache busting strategies.
Framework considerations
I recently reviewed the performance of one of our clients’ websites. During its lifespan, a myriad of developers had contributed their code without any form version control.
One thing that struck me instantly was the heavy use of JavaScript and CSS frameworks. I counted a total of three framework integrations accompanied by several other scripts that seemed to be solely fulfilling just one purpose each. Even for an “organically grown” codebase this seemed a bit too much.
When it comes to frameworks of any kind, I think it’s worth considering that it comes at a cost. Not to sound old and grumpy but I still see especially young developers choosing their own convenience over the convenience of their users and disregarding the fact, that throwing another 100 KB JavaScript into the mix might actually do more harm than good in terms of performance (and therefore: user experience).
Don’t get me wrong: frameworks are great and they can make your life easier if they are considered well. Let’s say you’re building a web application and are planning to use all kinds of enhancements to make user input easier, i.e. date pickers, spinners, range sliders and so on, then sure, it might be worth considering a framework that can provide this kind of functionality for you.
But if you only want to attach an event listener to an element, then why bother including a JavaScript library to do what you could have done with just a few lines of JavaScript yourself?
What I learnt today: performance
Today, a colleague and I took the last steps to launch a new website for a client. I always enjoy these last couple of hours before a site goes live because everything gets “ready for production”.
In terms of frontend code, getting production-ready for me basically means “make everything as fast as possible”. And that’s what we did today.
I noticed that I recently developed an obsession with performance. Nothing is ever fast or small enough and I always try and make the code as fast as I possibly can. It’s a very rewarding endeavour, maybe because it’s measurable. That’s what I learnt today.