Friday, September 20, 2024

Reduce Code to Content Ratio

Search engines like quality content – the more, generally speaking, the better. Clogging up that well written on-page text that you spent so much time on (and search engine spiders like so much) with underlying page architecture code gets in the way of making your site more visible to search engines.

Highly graphical websites suffer from this as they require in-depth coding to get all their nice little graphics placed correctly before the actual text appears.

One solution is to pack away as much code as possible in external javascripts and delivering it using document.write(”). No serious user of the web can function without having javascript enabled in their browser so this is a fairly safe bet.

As an example: You have a website layed-out in a standard tables configuration, 3 rows and 3 columns.

The top row is a graphic header and spans the 3 columns. In row 2, the first column contains a nested table with several rows of images that form your menu (all very nice graphics with rollover states and so on and large amounts of code to effect this). The next column in row 2 contains your main page text that the spiders like. Column 3 is your ads (or whatever) and row 3 is your footer info with text links to all your pages (to back up the graphic menu).

Be sure to place each line of html code with its own call, eg:

document.write('<table border=0 cellpadding=0 cellspacing=0 width=120>');
document.write('<tr>');
etc, etc

Then, instead of all that complicated code for your graphic menu system appearing prior to the actual main page text, all you have is one <script> reference to your .js file.

This reduces your ‘Code to Content Ratio’ and makes your website more visible to search engines.

Note that search engines do not yet read or follow links in javascript, hence the text links in the footer section.

Many coders already pack away all their javascripts in external files to reduce on-page code, bandwidth and page load times – this is an extension of that practice.

An example of this in action can be seen here: Structural Insulated Panels by BIG.

Freelance Website Designer in Bristol, UK.

http://www.4-walls.com

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

Community golden gate estates. There are a number of factors and features to consider when evaluating a new help desk software.