homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google News Archive
Forum Library, Charter, Moderator: open

Google News Archive Forum

This 80 message thread spans 3 pages: 80 ( [1] 2 3 > >     
Can Google Follow JavaScript?
To reduce the number of links from a page,want to introduce JavaScript link

 4:56 am on Jul 18, 2003 (gmt 0)


I want "SOME OF THE LINKS" from my home page not to be followed by Google (to reduce the number of links at the home page).

Can I use JavaScript for this purpose? Will Google follow JavaScript links?

All responses will be highly appreciated.

Thanks in advance.



 5:48 am on Jul 18, 2003 (gmt 0)

Go for it! Google ignore Java.


 6:44 am on Jul 18, 2003 (gmt 0)
It seems that Javascript links may be followed if you put the full url in it ie http://www.yourdomain.com/yourpage.htm

So if you don't want it to follow the link simply use relative paths.



 7:34 am on Jul 18, 2003 (gmt 0)

I have been using javascript and its certainly helped. Go forr it.

Martin Dunst

 8:12 am on Jul 18, 2003 (gmt 0)


one objection from my (non-seo) point of view:
keep in mind that javascript links undermine the hypertext concept and they might eliminate real users.



 8:14 am on Jul 18, 2003 (gmt 0)

Is this (kind of) like cloaking?

Since you're technically showing (javascript enabled) humans one thing, and the bot another?


 12:21 am on Jul 19, 2003 (gmt 0)

Is this (kind of) like cloaking?

Depends on how you look at it I suppose, but search engines don't consider it cloaking.


 4:27 am on Jul 19, 2003 (gmt 0)

We use an external javascript file, which helps keep our pages clean. Works well :)


 5:14 am on Jul 19, 2003 (gmt 0)

I am not sure google will not follow Javascript links.

le_gber gave a good example. FWIW Matt cutts of google at Pubcon 4 said google is aware of Javascript links and can follow them. HTH


 5:41 am on Jul 19, 2003 (gmt 0)

Google definitely has followed the java links on my site. I have text links on the bottoms of the pages now, but Google indexed the pages before the text links were there.

The wierd thing is, I have a client's site that uses the same type of java scripting, and the Goo didn't make it past the first page the first time it got crawled.




 7:43 am on Jul 19, 2003 (gmt 0)

I wouldn't say this is cloaking.
Cloaking to me is having less appear on the site than SE's index, but if you do things the JS way it gives more than the SE's show.

You should, however, provide alternative navigation for viewers with JS disabled. You can do this with a <noscript> tag. I use an iFrame in the <noscript> which embeds my sitemap to every page. This is seen by SE, and indexed as 1 outgoing link.


 8:02 am on Jul 19, 2003 (gmt 0)
What about redirect scripts - does Google follow them? Somthing like,


and then blocking cgi-bin via robots.txt. Is this followed by Google?


 6:07 pm on Jul 20, 2003 (gmt 0)

Surely using javascript for external links on a page is a good thing, particularly when you have a number of affiliate links - but then would affiliate links leak PR anyway, or does google count them?


 7:59 am on Jul 21, 2003 (gmt 0)
Or redirecting it something like this, http://www.my-domain.com/rd/number where the number corresponds to a external domain.

 7:20 pm on Jul 21, 2003 (gmt 0)

Imaster, Google reads robots.txt, so if you cut off the /cgi-bin/ it will not follow links to it. If you really donīt want to give the bot any kind of chance, you could use an id in the redirect script in stead of "something that looks like an url", as well as the robots.txt:

http: *//www.domain.com/cgi-bin/redir.pl?id=00012345


<edit>if, on the other hand, you want Gbot to follow your redirect, a spider-friendly redirect script can easily be made, there are other threads about this</edit>


 3:03 pm on Jul 22, 2003 (gmt 0)

I have a client wants to create a easy to navigate site but worries that Google or the other search engines won't be able to follow the links. I never used these menu's before so the more that people can tell me the better.
I need to know the following:

Does Google see the text (when text is used instead of an image) in a Javascript navigation menu?

Does Google see the link in a Javascript navigation menu?

If so, when does Google not see the link? (I saw it written that absolute links are followed and relative paths are not, is this true?)

Can it follow this link?

Can someone give examples of crawlable web sites? (I hope this is okay to ask)

I appreciate the help!

Made In Sheffield

 3:13 pm on Jul 22, 2003 (gmt 0)
FWIW Google followed some JavaScript links like this:

<td onclick='window.navigate(&quot;page.asp&quot;)'

so it's no just if you use the http://.

And one more thing:




 3:19 pm on Jul 22, 2003 (gmt 0)

Thanks Nigel,

Actually I know Java and Javascript are two very different things that wasn't my question.

Does Google see the text (when text is used instead of an image) in a Javascript navigation menu?

Made In Sheffield

 3:28 pm on Jul 22, 2003 (gmt 0)

Hi Alan,

The Java comment wasn't directed at you, it was a general reply to all those on the thread calling it Java, it just happened to be after your post.

I've stickied you the url for a site that uses JS links and has been fully crawled (no link posting on here).

Hope this helps, I don't know about the link text, I asked that same question this morning on another thread but nobody has replied. They seem to give the same PR benefit though.



 3:50 pm on Jul 22, 2003 (gmt 0)

Thanks again!

Anyone know the answer to the text question?


 4:24 pm on Jul 22, 2003 (gmt 0)

AFAIK Googlebot reads and indexes text. JavaScript is text. A text link inside a javascript is text, relative or not. It will get read. The issue is; will it be recognized and treated as a link or will it get treated as plain text?

I've seen some posts (not only from Made_In_Sheffield) suggesting that some links that are not on the standard form <a href=""></a> can get catched, eg. unanchored links or links in scripts, but i really do not know what Gbots exact limits are on this point, i have seen quite a few questions, but no really clear answers.

If you want it to be identified as a link, i would suggest you make the string as "link-looking" as possible and include the http part as well:

ie. "http://www.example.com/page.html", not just "page.html"

If, on the other hand, you want to hide it, it is quite easy to make JS-code that makes it hard to recognize it as a link. Just mess all the characters around and you're there.



 4:36 pm on Jul 22, 2003 (gmt 0)

To begin, I'll tell that using JavaScript to prevent the SEs following a link IS CLOAKING. May be the SEs don't consider it cloaking or don't penalize it, but this happens because manual (non-automated) work is needed to find and check JavaScript links. Even so, it's cloaking: you're showing some things to the user and other things to the robots. It's cheating and dirty play.
So I hope Google will improve its robots, spiders and crawlers to follow ANY link put in a page, 'cos it's what they should do.

I will add some definitions to let all of you understand what is Java and JavaScript:
Java: Object Oriented Programming (OOP) language based on C++ that lets the page designers to create small applications (called applets) that run on a web page independently of the platform. An applet must be compiled before it can be run.
JavaScript (or JS): Scripting Language for the Web that has a sintax inspired in Java, but very simplified. It is interpreted, not compiled. It's used, mainly, to make the content of a page more dinamic without cgi nor Java.

So, if I see again something that says Java to refer JS I'll be very angry X(


 5:06 pm on Jul 22, 2003 (gmt 0)

Ohyes, herenvardo, you're absolutely right there, it's cloaking allright. Thereīs a more civilized approach, which well-behaved searchengines and spiders accept:

<meta name="robots" content="index,nofollow">

The problem with this approach is that the nasty bots couldn't care less what you write in a meta-tag. Not all bots are good bots. Gbot is, so the metatag would be better advice in this case.

It is a catch-all, though - the "nofollow" will be the rule for all links on the page, not all links except the secret link to my personal photos, notes, or whatever.



 5:33 pm on Jul 22, 2003 (gmt 0)

FWIW Matt cutts of google at Pubcon 4 said google is aware of Javascript links and can follow them.

I had an extended conversation at PubCon with Matt, and I can confirm this report. In fact, he said we can expect to see more of this as Google continues to develop this approach -- not parsing the javascript, but looking at it as pure text and seeing if their might be a URL in there.

Same thing applies to form actions and other nooks and crannies where potential URLs may hide.

Blue Gravity

 6:39 pm on Jul 22, 2003 (gmt 0)

I'm curious though, if you have java on your page, a crap load of it, is there a point where Google will just stop reading the code and move on, or does it read the whole thing, and just overlook the java?

Made In Sheffield

 6:49 pm on Jul 22, 2003 (gmt 0)

Java code isn't in the page! (Bangs head against brick wall, ouch :-)

If you mean JavaScript then the answer (AFAIK) is no, it will examine the code for possible urls as previously stated.



 7:03 pm on Jul 22, 2003 (gmt 0)

I can confirm this report.

Thanks Tedster. Helps unfortunate souls like us (who cannot attend Pubcons) when members like you give such details :)


 7:19 pm on Jul 22, 2003 (gmt 0)

Google won't follow Javascript Links that are placed in external files. No PR is passed. And no anchor text is associated with the target page.

Many websites do this for reasons other than hiding links. Personally, I like to test different text copy on my button labels, and using an external file allows me to do this in one place for a 100 page site.

So cloaking, cheating, whatever you want to call it is not always the intent of the website developer. Google will never treat this as cloaking for this reason.

At this years WebmasterWorld PubConf I asked Matt Cutts as to whether using Javascript for linking would be treated as hidden links. And he gave me a very clear no. He told me that using Javascript to link was fine.

He did make other comments about the text contained in an on-page javascript tag as being "interesting" and something that they were looking at further.

Make of that what you will.


 8:06 pm on Jul 22, 2003 (gmt 0)

File size:

I have found at least three threads here stating that Gbot does not index more than the first 100Kb of a file. It's a bit unclear if the first 100Kb are indexed for the cache only, or if the index have the same limit - the index-limit need not be as "low" as the cache-limit. Unfortunately, i could not find this information on Googles own pages.

Number of links:

There's apparently a limit of 100 links per page. The Google Guidelines [google.com] also mentions this, but not as a limit, just advice.


<added>Btw, thanks mil2k, Made In Sheffield, tedster, and egomaniac - it's really nice to get the JS-link-extraction confirmed from four sources :)</added>


 8:30 pm on Jul 22, 2003 (gmt 0)

Mr. Roy why do you want to use java for links?

Google follows text links very well and generally does not screw it up. Java seems to have mixed results in WebmasterWorld, so why would you need to do it. If you do need it for smooth opperation of your site use alt tags to make it less painful.

Please tell me that you are not using frames.

This 80 message thread spans 3 pages: 80 ( [1] 2 3 > >
Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google News Archive
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved