Yesterday, I wrote about parallel vs. waterfall downloads and how they impact web performance.
Turns out Harry Roberts from CSS Wizardry was thinking about some of the same stuff. He published an article yesterday on the three Cs of web performance: Concatenate, Compress, and Cache.
When serving and storing files on the web, there are a number of different things we need to take into consideration in order to balance ergonomics, performance, and effectiveness. In this post, I’m going to break these processes down into each of:
- 🤝 Concatenating our files on the server: Are we going to send many smaller files, or are we going to send one monolithic file? The former makes for a simpler build step, but is it faster?
- 🗜️ Compressing them over the network: Which compression algorithm, if any, will we use? What is the availability, configurability, and efficacy of each?
- 🗳️ Caching them at the other end: How long should we cache files on a user’s device? And do any of our previous decisions dictate our options?
Harry also recently gave a talk on this at State of the Browser, if you’d like to watch rather than read.