Forum Moderators: open

Message Too Old, No Replies

Code to text ratio

Whats good and whats bad

         

malcolmcroucher

7:30 am on Jul 23, 2008 (gmt 0)

10+ Year Member



So What would be a good code to text ratio ?

I have 12kb site with 9 kb code and 3 kb text ?

it works out to 23.64%

1.What would be a good ratio ? I imagine 50%

2.Would google penalise for over coded sites ?

Regards

Malcolm

JamieBrown

12:22 pm on Jul 24, 2008 (gmt 0)

10+ Year Member



Hi again Malcolm,

I don't think many SEOs really work to a strict percentage - I think that would depend too much on the content that's on the page.

Instead its pretty much about minimising the amount of code that's on-page and putting it off-page where possible and practical - usually by using external CSS stylesheets and JS files instead of putting your CSS and JavaScript inline or using HTML styling.

You could also look at content positioning in your code - is there an effective way to put your page content higher in your HTML, above any code that you can't move out? Many sites use static positioning in CSS to acheive that - putting a DIV for the page content at the top of the HTML code and then positioning it with CSS.

Having said that, I think the SEO benefits of these techniques are minimal. Historically they may have made a bigger difference, but now they're less relevant.

Instead, moving content out into external files can help with server load and page load time, because once the user has visited a page once they don't have to reload the CSS / JS content for other pages.

Cheers,

Jamie