tags:

views:

175

answers:

2

I'm trying to use something like jQuery biggerlink or just simple window.location for making bigger and more accessible links. What I'm wondering is what happens with SEO in these cases — I have anchor link in the containing element, but does Google penalize such actions since I'm not really clicking on link. Also, are there any other solutions (besides CSS positioning) which could be better than this one? Thanks.

A: 

Search engines generally don’t interpret JavaScript, they just read what your HTML markup says. So your SEO attempts will be overlooked.

Gumbo
I am starting to wonder how much of this is folk knowledge. I do know that Google does deal with some Javascript, and has been doing so since "Ajax" applications took off. The extent of it is probably undocumented outside Google, but I don't think that it's correct to say no search engines pay attention to Javascript at all.
eyelidlessness
@eyelidlessness: Do you have a proof for that? It might be that search engines try to read `document.write("<foo>…</foo>")`, `location.href="…"` and some other trivial stuff. But I wouldn’t call that interpreting JavaScript. JavaScript is way more than that.
Gumbo
@Gumbo: that’s not true nowadays. Google evaluates JavaScript. http://baxil.livejournal.com/266909.html
Jeremy Visser
A: 

Setting window.location from script will not be spotted by search engines (Google has detection for simple document.write additions but this won't catch any of the more advanced DOM scripting stuff). It's also bad for usability: all the usual browser controls you get for links, like middle-click-for-new-tab, right-click-copy-location or bookmark stop working.

biggerlink avoids the SEO issue by keeping the correct <a href> markup in the HTML, and adding extra click handling over the top of that. (The ‘bigger’ parts of the biggerlinks still don't respond to eg. middle-click, but the ‘native’ parts do.) As long as you keep <a href> in an appropriate place you don't have to worry about search engines.

I'm not at all sure this stuff is necessary. The effects I've seen biggerlink do could easily be done using links with ‘display: block;’ and occasional workarounds like multiple links when you want to do things like headings inside the links. Sure it's a little more markup, but it's a lot less scripting and then all links respond in the expected way links usually do.

bobince