Basic SEO: What Search Engines Hate
(Page 1 of 4 )
In my last article, I went over a few of the things that search engines love. Now, I'll finish up the discussion with an article on what they absolutely hate, which includes everything from clutter to cookies. So if you're in the mood to build a website, grab your pen and paper and start taking notes, because this article will offer some of the most important tricks of the trade.
A wise man once told me to kiss. No, not what you're thinking. Not that there's anything wrong with that. KISS – keep it simple stupid. This can be applied to almost any walk of life, especially SEO. And one way to tell if your website is properly optimized is by how cluttered it is. For a website to be cluttered, it has to have vast amounts of unnecessary code, not including the actual page content. If the text of a page is around five percent of the total source code, you might be cluttered my friend. Be on the lookout for excessive code used for JavaScripts, navigation bars, JavaScript event handlers, Flash animation, etc, especially if it's above the page content, because it can prevent some search engines from reaching it.
One way to avoid clutter is to use external JavaScripts, instead of placing them inside a page. This means that they should be put in an external file – a tag in the page calls the script, which is then pulled from a different file on the web server. Doing this will make your life easier for a number of reasons, not including the SEO benefits. First of all, you can have a library of all the scripts on your site in one directory. You can then change your HTML code without worrying about damaging the scripts. It also makes for less download time when the script is used on several pages because the browser will cache the script after downloading it once.
To create an external JavaScript file, just save the text between the <SCRIPT></SCRIPT> tags in a text editor (e.g. Notepad). Then save that file on your web server as a .js file. Finally, refer to the external file by adding a src= attribute to the <SCRIPT> tag. Here is an example:
<script language=“JavaScript” type=“text/javascript”
src=“/scripts/nameoffile.js”></script>
Another JavaScript trick that will help you remove lengthy code is document.write. This can be useful for fancy navigation bars that change colors, Flash animation, and whatnot. Just follow these instructions:
Type this in an external text file (create this file the same as above - in a text editor):
<!--
document.write(“”)
//-->
Place the code you want to remove from your page between the quotation marks in the parentheses.
Save this file on your web server.
Add a src= attribute to your <SCRIPT> tag so the file will be called from the HTML page.
<script language=“JavaScript” src=“/scripts/nameoffile.js”
type=“text/javascript”></script
If you remove the navigation bar, you should add plain text navigation somewhere (such as the bottom of the page) so that the searchbots can read and follow your navigation. My last article explains why searchbots only see what the web servers see when compiling a page, and they don't run these types of JavaScripts.
Next: More Clutter >>
More Search Optimization Articles
More By Michael Lowry