
You’re looking for a vital document, and you have less than eight minutes to find it
You know it’s on your desk; you saw it there only a few days ago. Except your desk is covered with piles of papers, unopened envelopes and bills, discarded printouts, not to mention yesterday’s coffee cups. You keep rifling through all the clutter, but it’s hopeless. With all that junk on your desk, you know you’ll never find what you are looking for.
Is your website’s code a little like your desk?
Just a second. What do I mean by your website’s code? You didn’t use code to create your site, you used a web editing program, or a site builder that came with your hosting, right?
Every website is built using code
It doesn’t matter what you built your site with, or who built it. If you used a site builder program or a website editor, all that program did was create the code for you based on what you told the program you wanted your site to look like. This code runs in the background, and tells your website visitor’s internet browser how to display the page.
So where is this code, and what does it look like?
To have a peek behind the scenes, just open your internet browser, go to the top menu, click View, then View Source. A window will open. That’s your website’s code.
Does it really matter if things are messy behind the scenes?
Surely it’s what the front-end looks like that’s important? When many website editors (often called WYSIWYG, or What You See Is What You Get) or online site builders create the code for you according to the way you lay the page out in the editor (which works a little like a word processing program), they usually generate messy and inefficient code, full of errors and repetitions.
The result is a page that takes much longer to load
A bloated page full of unnecessary code can double or triple the page size, or more. Google now takes into account page loading speed when ranking websites. This is only one factor of many that Google uses to evaluate your site, but with all other things being equal, a faster-loading page with fewer errors will rank higher in the search engines than a slower one with bloated code.
But, perhaps more importantly, bloated, junky code makes it difficult for the search engines to find and understand your content
Search engines regularly send out “spiders” – robots – out onto the internet to “crawl” through everything they find, then report back to the engine so all the information and content can be indexed and ranked. When the friendly neighbourhood spider comes knocking on your door, he will find a jumble of clutter instead of nicely organised content all laid out for him to inspect. He’ll have to clamber over a load of junk to try to find the content hidden under all the mess and, just like your untidy desk, important things will be hidden and lost.
He may even give up looking and move on to the next site. Having a nice, clean, organised code running behind your page makes the Google spiders happy, because they can easily find and understand the content they are looking for.
So how can you tell if your code is a mess?
Messy code isn’t hard to spot. Take a look at these two examples:
Example 1
- Example 2
When you look at your website’s source code, does it look ordered, with the content clearly visible and easy to pick out (example 2)? Or is it just a big jumble, with the same code repeated over and and over again (example 1)?
The secret to sparkling clean code
Forget WYSIWYG editors, online site builders and the rest. For the cleanest code, try running your site on Wordpress. It’s easy to update and edit, you don’t need to know how to write a single line of code, and the code it generates is so spare and clean you could eat your dinner off it (as long as you make sure to use a well-crafted theme like Thesis, you don’t copy/paste text from Word into the Wordpress editor, which will introduce lots of junk code, and don’t overload the site with too many widgets). Take the images above: Example 2 was built with Wordpress. Example 1 is a site built with an online “site builder” that came free with some hosting.
What if you don’t want rebuild your site from scratch?
Try cleaning up your existing code using a free online code validator. This tool will check your site for errors, and clean up the code for you.
If you want to learn more about what exactly causes bloated code, here is an excellent article on how to clean up after WYSIWYG editors.
Remember: the search engine spiders can’t see the monitor like you can
They can’t see how pretty your site looks or how cool your graphics are. They can only read the code behind the page, so remember to keep the back rooms spick and span so Google can find what it’s looking for when it comes to visit. Your desk can wait until tomorrow.
Summary
- Your website is built on code that lies behind the page and tells the browser what to display to visitors
- Search engines need the code to be clean and tidy so they can find the content they are searching for and index your pages correctly
- Bloated, messy code also makes your pages load more slowly, which also affects search engine rankings
- WYSIWYG editors and site builders create reaaally messy, bloated code
- Wordpress websites have spick and span code and are easy to update.
{ Comments on this entry are closed }
