PDA

View Full Version : Javascript and Search Engines


agatlin
05-05-2002, 01:57/01:57AM
Howdy!

I am very interested in learning what effect Javascript (and all kinds of scripting) has on search engines and what sorts of things cause problems.

I do a lot of data driven web development and use Javascript heavily in many sites.

I am looking forward to getting this discussion started.

Hope
05-05-2002, 11:11/11:11AM
Javascript and most languages are not read by search engines. This can be a major problem for indexing. You need to remember you need to have solid text in your site.

Advisor
05-05-2002, 12:05/12:05PM
Generally, if you're using javascript, say for mouseovers, and that sort of thing, you'll want to put the script in a separate text .js file so as not to bog down the spiders when they try to "read" your site.

Avoid links that are coded with javascript as opposed to "regular" href tags or the spiders won't be able to follow your links.

Other than those things, I can't think of any other things to watch out for in regards to javascript.

Jill

Blue
05-05-2002, 13:05/01:05PM
One other point is that if you must keep javascript on the page vs. in an external file, try to place it towards the end of your code. You want the text, with your keywords, to be read as soon as possible. And if you're using javascript for a nav menu, consider the table trick (http://www.wordsinarow.com/tabletrick.html).

Patrick
31-08-2002, 16:39/04:39PM
The fact that spiders won't be able to read links with javascripts.. is that something that will that change some time soon ?

you can really impact your ranking by putting all the outbound links in javascript, and links within your own website in normal HTML... hence keeping the PR in your own site, and gaining from others linking to you.

Isn't that something that search engines would want to deal with ?

Patrick

Advisor
31-08-2002, 17:41/05:41PM
Originally posted by Patrick
The fact that spiders won't be able to read links with javascripts.. is that something that will that change some time soon ?

you can really impact your ranking by putting all the outbound links in javascript, and links within your own website in normal HTML... hence keeping the PR in your own site, and gaining from others linking to you.

Isn't that something that search engines would want to deal with ?

Patrick I hope they deal with that. I would simply take away ALL the PageRank of a site that put all their outbound links in javascript. I think it s-ucks, and it's greedy, and it's simply hoarding PageRank for your own purposes. It's just nasty, and dumb!

Jill

g1smd
06-10-2002, 09:17/09:17AM
I see that most pages using JS fail to validate, as they forget to use the type="text/javascript" attribute within the <SCRIPT> tag. In fact, most of the JavaScript tutorials and books also fail to mention this attribute. Many people also forget to encode the &amp; as &amp;amp; as well.


JavaScript coded items need to have one of these two formats:

For one line references to external files use:

<SCRIPT type="text/javascript" language="JavaScript" src="filename.js"></SCRIPT>
<NOSCRIPT> ... HTML code for non-JS browsers here ... </NOSCRIPT>

Note that <SCRIPT> tags can go inside <HEAD> tags (best placed as the last item there), or in the <BODY>; but that the <NOSCRIPT> tags can ONLY ever be placed in the <BODY>.


For code that is embedded within the page use:

<SCRIPT type="text/javascript" language="JavaScript"><!--
... JS program code here ...
// --></SCRIPT>
<NOSCRIPT>
... HTML code for non-JS browsers here ...
</NOSCRIPT>

The Comment Tags: '<!--' and '// -->' are especially important in the second one.



After writing all this stuff the last job is to send the page to http://validator.w3.org/ and get the HTML syntax checked out for errors.

markymark
06-10-2002, 17:58/05:58PM
I believe that Thunderstone have just brought out a technology that allows them to follow javascript links, so I guess the other search engines won't be too far behind.

http://biz.yahoo.com/bw/020730/302331_1.html

markymark
06-10-2002, 18:01/06:01PM
Just noticed that you can download a free copy of the javascript crawler from the thunderstone website.

nzbase
06-10-2002, 18:57/06:57PM
thanks for the tip markymark, I hadn't heard about Thunderstone before ... :)