Post Archive

› November 12, 2002

Content to Code Ratio Tool at Holovaty.com

  • Reported by Nate

I'm sure many savvy readers ran into this already, as I've been out to lunch again and missed it last week: Adrian Holovaty put together a tool for measuring a content to code ratio he calls getContentSize. It measures page size with and without markup (no images or attached CSS, javascript measured in either case). It raises interesting questions because the tool does not reward good coding practices, but takes a wholesale look at how much of the data you're transfering is what folks are reading, and how much is markup related. Ostentiably it does favor less bloated code, in that heavily nested table sites are more likely to have higher non-content ratios, but it also give poor marks for a long list of links (which raises the question of how valuable a blog roll is when considering content for instance).
So how does this site fair? A pitiful 28.5% content! I am greatful for this tool, it has caused me to take a good look at why 71.5% of this site is markup, where and why all the bloat? Two main reasons: presentational markup which is really not necessary (and will be updated), and because I've flanked the weblog with two columns of links.
Kudos to Adrian for providing this thought provoking tool, and thanks to Meryl for linking to it.
[11/13 - fixed Mr. Holovaty's Name, incorrectly reported because I tend to be a bonehead]

Comments

1. November 13, 2002 12:31 PM

Quote this comment

huphtur Posted…

is that why you typed so much for this post? heh.

2. November 13, 2002 01:25 PM

Quote this comment

Nate Posted…

Ha! Nope, it wasn’t intentional, I’m just a wordy guy. But look–now it’s up to 31.98 %

3. November 13, 2002 04:05 PM

Quote this comment

Simon Willison Posted…

I don’t think the tool is meant to discourage lists of links or devalue blogrolls–in fact Adrian posted the day after launching it that he was considering changing it to include link markup as content rather than markup (links are after all the cornerstone of the web). Incidentally, one of my favourite things about web-graphics is the bookmarklet list on the right hand side.

4. November 13, 2002 07:40 PM

Quote this comment

Nate Posted…

Ah cool, thanks for the clarification Simon. I’m looking forward to Adrian’s (I got his name wrong too) new version. I’m thinking a modified version of the script he released might make a neat “status” type indicator for weblogs–to see how the percentage changes for a given design over time. Maybe averaging out a once a day reading that’s been tallied for a few weeks could be useful. Just thinking a loud at this point, anyways thanks for the note Simon.

5. November 14, 2002 11:01 AM

Quote this comment

Nate Posted…

Cool! Ask, and ye shall receive: GetContentSize has been updated (notes here), now “title”, “alt”, and “summary” are read in as well. This site’s homepage reads in at 33.89 % at the moment. As an added bonus, the php alterations made to include these attribute values seems simple enough to re-use for other attribute values (should you wish to roll your own more or less inclusive version, for whatever reason).

6. November 17, 2002 05:12 PM

Quote this comment

Dave Posted…

beandizzy offers a convenient bookmarklet and some good advice about saving other people’s bandwidth.