Many websites use Javascript these days in their code. Javascript can definitely make your web pages more exciting, dynamic and interesting for the user, but it can certainly harm your search engine optimization (SEO) efforts.

Most search engines do not interpret Javascript, and those that do interpret Javascript mainly want to find if your site is using sneaky redirects to cheat the search engine. Also, when a search engine spider visits your site, it tries to gather most important information about your site from the text towards the top of your code . For better search engine ranking, you should make sure that you have a high keyword density for the words you are targeting within the first 200 words or so. If you have a Javascript menu at the top, it will put lot of code associated with it in the header section of your pages thus pushing all of your important content further down the page. Thus, Javascript can be detrimental to your search engine placement by diluting your keyword density.

So what’s the solution? Well, it is better to avoid Javascript and use HTML text links instead of Javascript menus. Search engine spiders can crawl text links much easier and will index your most important pages faster. Another technique to avoid dilution of keyword density is to place the Javascript code in an external file and name it with .js suffix.  You can then call the Javascript in your page by inserting a single line of code such as

Google SEO Tips 

Thus, by placing your Javascript into a separate external file, your website will be more ’search engine friendly’.

Technorati Tags: , , ,