Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Will javascript on scrolling nav list cause problems in Google?

         

DiscoStu

6:49 pm on Jan 13, 2010 (gmt 0)

10+ Year Member



I'm planning on putting a bunch of normal static html links in a div tag, and then add a javascript to the header that displays the link in the div tag as a scrolling list to the user. Will this affect seo at all?

I'm a little hazy about exactly how js effects seo, I only know that it can cause problems (but I think this is only when the link is within a javascript command in the body?).

Thanks

Demaestro

7:08 pm on Jan 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you have the links hard coded into the page and then you use JS to affect their look/style/position then you are fine.

It is when you us JS to bring links or any element into a page that google can't see it.

Rule of thumb is if you can see it when you view source then Google can see it.

DiscoStu

8:57 pm on Jan 13, 2010 (gmt 0)

10+ Year Member



Thanks that's what I suspected!

FranticFish

9:24 pm on Jan 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



According to Danny Sullivan and Vanessa Fox, Google started crawling simple Javascript links where the url is available last year. Not sure if I can link to the article here, so just haev a quick look online - this was mentioned in a few posts on SearchEngineLand.

tedster

10:16 pm on Jan 13, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can verify seeing this in the wild for at least a year. Sites with nothing more than a JavaScript link (or a simple form input) to an internal page can see that page getting indexed and ranked.

At PubCon Austin last year, I discussed this with Matt Cutts and he acknowledged that it was happening. He said that when Google discovers a URL this way, they add a "virtual link" in their web graph, so it also can pass link juice.

[edited by: tedster at 6:44 pm (utc) on Jan. 14, 2010]

Demaestro

3:21 pm on Jan 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



tedster do you know if they are executing some easy JS to get links or are they simply looking at onclick in a tags?

I also wonder what if you are using JS to un-obfuscate a link, I assume that Google doesn't try to "decode" it.

tedster

4:27 pm on Jan 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Google does go beyond simple text extraction of the link from a JavaScript string. They will execute some simple JavaScript links if the function called is on the page and not in an external file. So they are pushing the boundaries and will continue to, I'm sure.

The guidelines that Google published for AJAX [google.com] are worth a read if it looks like you must use a JavaScript menu system. Among other things, those guidelines recommend Jeremy Keith's Hijax approach [domscripting.com] to offer static links that can co-exist with your JavaScript enhancements.

[edited by: tedster at 6:45 pm (utc) on Jan. 14, 2010]

Demaestro

5:04 pm on Jan 14, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Tedster,

Thanks for the info,I am off to read.

DiscoStu

11:44 pm on Jan 21, 2010 (gmt 0)

10+ Year Member



So type of javascripts will mess with seo? can an onclick event in the <a> tag block it? Is there an easy way to know if javascript is causing problems with a particular link?

tedster

4:12 am on Jan 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If an onclick event feeds a coded variable to a script, especially an external script, then the destination URL is hidden from spidering. That's a problem.

From a search engines point of view, they are not about to start actually executing any old JavaScript on their back end servers. That's a huge security risk.

So the progress has been rather slow in terms of what kinds of JavaScript links will be indexed. The easiest to deal with are where the URL is plainly visible as an uncoded character string. Nothing needs to actually be executed in that case - simple text analysis easily reveals the destination URL.

dstiles

11:22 pm on Jan 22, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I wonder what this does to email links that are obfuscated by simply being split up within a JS call, which then puts it back together again when clicked on. If it "decodes" the addresses AND publishes them then that is a serious breach. Luckily it was a trick I never used, finding better ways of obfuscation.

I am now using less and less JS on newer sites, partly prompted by the SE announcements some time ago and partly by JS exploitability. It's pretty much down to collapsed text and optional form field verification, now. Neither use is compulsory.