Text To Code Ratio Checker

It is important to build optimised web sites, not just on the back end, but on the front end too. This tool will tell you how much code you are using compared to the amount of content that is on your page.

A lot of search engines such as Google base their search results upon relevancy to the content provided. I a page isn't relevant, it won't appear in the search engine results pages (SERPs) as high as a page that is.

If your web page contains too much code, such as HTML, this could prevent a search engine spider from crawling the page in its entirety. Search engine crawlers these days have become much more advanced and are able to check the amount of code there is on a page and compare it to the amount of text as part of its algorithm. If the page is too big, the spider may only capture portions of the page, leaving out possible vital and relevant content.

Type the full URL (including 'http://') of the domain into the form below and we'll run a quick check to see what your text to code ratio is. Please note the percentage you see if the percentage of text to code... if you want to find out the code to text ratio to subtract the text ratio from 100(%).

If you're looking to see the text-to-code ratio of a local file just put the contents in the following box and we'll check it that way instead.

What do these ratios mean??

Basically, the higher the percentage, the better. Up to a certain point that is. If you've got higher than about 70% or so then you've got a lot of text and not a lot of code, which might sound like a good thing, but could represent spam too. We have added a traffic light colour scheme to the result of your checked page, Red, Amber and Green.

  • Red: 0% - 10%
  • Amber: 11% to 24% (and 70% +)
  • Green: 25% and over and your page is BLOAT FREE and will work well in the SERP's.

Text To Code Ratio Firefox Extension

I have written this tool as an extension to Firefox that you can download here and it will sit in your statusbar (at the bottom right) and each time you load a new page/switch to a new tab it will run in the background and display the text to code ratio for the given current web site.

If you have any comments or would like to leave feedback you can either comment on the add-on page, or leave a comment here and let me know what you think, or what you feel could be improved. I hope you enjoy using this tool as part of your browsing experience with Firefox!

  • Author: Gustavo Carreno

    #1 | 20th Apr 10 @ 23:03

    Issue #1: The addon should have a black list of URLs to avoid parsing since it really doesn't have any content. Things like the about:* should be avoided. There are other examples one should avoid, but it's too late in the evening and I need my beauty sleep!

    reply

    • Author: Alex Hall

      #2 | 20th Apr 10 @ 23:06

      Thanks for the feedback Gus. I'll look into that issue as soon as I get some time and try to work out why it is still seeming to try and get the ratio of a page that hasn't loaded/doesn't exist yet.

      reply

    • Author: Gustavo Carreno

      #3 | 21st Apr 10 @ 00:30

      I think I got you a bit confused. I'm talking about blank pages and/or pages that are know to not have any SEO content, like about:config, about:blank and others. My suggestion on the DOM loaded event was just a first reaction. Most probably that's not the issue. But I will test it some more, cuz like I said, it's too late and I need me sleep :P

      reply

      • Author: Alex Hall

        #4 | 21st Apr 10 @ 15:39

        Ah, I see what you mean. I've made some modifications to it today to hopefully help with that, but I'll to write up a list of 'blank' pages, or pages to ignore so that it doesn't even try to run... otherwise you will always just get an error.

Add A Comment For This Tool

Other Tools

Add Us To Twitter

Add Us To Twitter

This site, and any site connected with this site will not know or use the details provided here by you. Or add us manually

This Months Most Viewed Articles

News/Blogs/Articles

The Decline Of Internet Explorer 6?

Recently I've been looking at some new sites made by various designers and developers and I've begun to notice a trend. The obvious use of CSS3 and HT...

read more

Microsoft Could Support IE6 For Longer!

I know it's the most depressing news you've probably heard for a long time, but Microsoft are talking about extending the life of Windows XP based on...

read more

CSS3 Rounded Images Without Clipping

Have you ever tried to style an image in CSS3 with a border radius of anything except 0? If you have you may have noticed that the image clips outside...

read more

The Complete Guide To Commenting On Any Blog

I read this post this morning and it cannot be closer to the thruth of it. I'll sum it up below but you should really go ahead and check it out and re...

read more

Eric Meyer On CSS3

Okay, if you haven't read this amazing article on alistapart I think you should head over there now and read it.Eric Meyer (of so much CSS fame, if yo...

read more