Why I Don’t Minify my CSS

Minification is Spending Dollars to Save Pennies

Every one of you has seen the list of recommendations to optimize your site for faster loading speed.  I guarantee that one of the top 3 recommendations is “minify your javascript and CSS“.    This seemingly innocent suggestion is one that nearly every site speed guide gives, and sure, it seems innocent enough.   Honestly, if it did more than make certain site speed tests raise your score by 3 or 4 points, I might just do it automatically.  But, I think it’s time we have an honest discussion about Minification and what it really does, and if it’s worth doing.

I’m sure, somewhere, there’s an audible gasp from my audience.  How DARE he question minification! I question it because no one else will.  Let’s look at a site I recently launched, Shady Oak Barbeque.  This site’s entire CSS stack is, unminified, 175kb in size.  Unminified, the CSS is human-readable and human-maintainable.  There’s no need for pre or post-processors on the site environment or my working environment.  Making any addition would require just a text-editor and FTP access.

Minifying the site’s CSS, and thus adding the need for more tools for maintenance, and making the CSS un-human-readable will save me a grand total of….. 417 bytes.   417 bytes?   Wow, that’s anti-climatic.  The very first computer available on the consumer market, the Altair 8800, which had no screen, no keyboard, and a series of switches on the front, shipped with 256 bytes, just to give you a perspective of how little minification can save your site size in loading.  I could let you know how many 10ths of a millisecond that 417 bytes could load, but I think that would be giving more thought to the math than the math requires.

I’ve always called Minification “Spending Dollars to Save Pennies”, and I think this example is a great way to illustrate that.  Why overload your environments with bulky pre and post-processors to handle minification when the grand total of savings average less than a kilobyte?    Honestly, better image compression practices and GZip compression in your htaccess file gives you better, more obvious returns than minification.