Wednesday, May 23, 2007

Is my blog fat?

The above image shows you what Firebug says it takes to load the blog before I posted this entry using the Verizon EVDO card. 1 MB? 27s? It's hard to believe. My immediate reaction is that the page weight of the blog right now is too high, it needs to go on a diet. But what to cut? How can I slim this down? This page weight link has some good tips, where is the fat on the blog? I used get|ben's page weight calculator to see where the fat was:

20 KB in Excess White Space? The rest, hey that's not so bad I think. 125 KB, so that means the rest of the 1 MB is in images? Yikes. But the excess white space, what can I do about that? I have never thought of this before, but apparently there is a whole cottage industry around HTML compressors. I guess you could also to some degree call them obfuscators, since they make the source extremely hard to read, but does having the source human readable really matter when its being served to a browser in production? In development sure, but I kinda wish HTTP servers would just do this instead of ZIPping the content. Why pay the compression penalty if you could get most of the benefit at "build time" without requiring support on clients? In practice all modern desktop browsers support GZIP compression, and in fact Blogger is already serving the content compressed:

Does anything on the server side already do HTML minimization (to distinguish from compression)? I didn't find anything specifically like this that is automatic, it all appeared to require developer interaction. If you do want to use HTTP compression with IIS, an article by Scott Forsyth seems to cover all the bases.
This is the load time in my office connection, so maybe the page is not that fat, but I also wish Blogger had a feature to only show the top, I don't know, 20% of a post with a jump to the full article. I have been working on a new very long post for a month now, and I have been holding off because I was worried about a bit the length on the home page. Oh well, I'll probably just publish it as one long article.