Calculate Code to Content Ratio
2004-12-21 23:49 - Bookmarklets
I was reading this page about code to content ratio earlier today. The gist of it is, when your HTML pages have (way) more HTML than they have words in them, they are bad. A measure of this is the ratio of code to content. A ratio of 1 means all content, 0 means all code. That page has an online calculator, and lower down someone commented about a bookmarklet they wrote to figure it out.
Well, armed with my enumerator below, I discovered a much much simpler way to figure it out, armed with two simple properties that do all the work for you! Firefox (Mozilla) only.