Google Answers Logo
View Question
 
Q: Search Engines and Javascript ( Answered 3 out of 5 stars,   2 Comments )
Question  
Subject: Search Engines and Javascript
Category: Computers > Internet
Asked by: danners-ga
List Price: $5.00
Posted: 23 May 2003 11:11 PDT
Expires: 22 Jun 2003 11:11 PDT
Question ID: 207795
Why does javascript interfere with search engine crawls and what can
be done about it?
Answer  
Subject: Re: Search Engines and Javascript
Answered By: wlk115-ga on 23 May 2003 11:36 PDT
Rated:3 out of 5 stars
 
Here's an explanation and fix from about.com 
Web Search - SEO 101: A Beginner's Guide to Search Engine
Optimization,
Part 5: JavaScript
http://websearch.about.com/library/weekly/bl-seo101-builde.htm

"...search engines are unable to read java script, navigation systems
built entirely with java script (such as drop-down menus) are neither
read, nor indexed by spiders..."
"...whenever possible, JavaScript should be placed in an external .js
file and simply called from the HTML code."

"Creating an external java script file is quite simple and allows you
to reference the same script from several pages without having to
duplicate the code. Simply save your java script as a text file with a
.js extension on it. To refer to this script from your HTML code,
simply call the file similar to how you would call an include or image
file."

< script src="filename.js" type="javascript" >< /script >

Clarification of Answer by wlk115-ga on 23 May 2003 17:34 PDT
Judging from the 3 star rating this was not exactly the answer you
were looking for, if you would like more information just add a
clarification or comment explaining what you need and I will be happy
to look in to it further.
danners-ga rated this answer:3 out of 5 stars

Comments  
Subject: Re: Search Engines and Javascript
From: j_philipp-ga on 24 May 2003 11:14 PDT
 
Referencing an external JavaScript is indeed better style than using
JavaScript inline (since it only has to be downloaded by clients
requesting it).
It can be done as described above, but there should be no space after
the "<" ("<script" instead of "< script").

However this is not a fix to the problem of search engines not
following certain JavaScript-menu links and so on.
Subject: Re: Search Engines and Javascript
From: wlk115-ga on 24 May 2003 16:31 PDT
 
The article cited above also has information on providing spiders with
an alternative route to follow links. Sites using java script
navigation should include a duplicate, textual navigation system at
the bottom of the page.

I didn't want to quote to much of her article for copyright reasons.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy