Last week Google made a few announcements at the Google I/O conference and one major one seems to have gone unnoticed.
A lot of people have suspected that Google is crawling JavaScript for some time but due to the random nature of it nobody has done extensive testing to prove either way. Testing this sort of thing is a waste of time because Google has different crawling rules for different sites and whatever is true today probably won’t be true tomorrow.
The changes were revealed by Vanessa Fox and are based around the way Google handles non-standard web links.
Googlebot is now able to construct much of the page and can access the onClick event contained in most tags. For now, if the onClick event calls a function that then constructs the URL, Googlebot can only interpret it if the function is part of the page (rather than in an external script).
Some examples of code that Googlebot can now execute include:
<div onclick="document.location.href='http://foo.com/'"><tr onclick="myfunction('index.html')"><a href="#" onclick="myfunction()">new page</a><a href="javascript:void(0)" onclick="window.open('welcome.html')">open new window</a>These links pass both anchor text and PageRank.
This is welcome news from Google, even if it changes things a bit. With an algorithm built on links there is no reason Google should count some links and discount others just because of the way they are implemented. From a users point of view if you can click on a link then it’s a real link and that’s how Google should see them too.
This change does bring about some interesting issues and I wonder how many sites will suddenly see thousands of new pages being indexed or a massive boost in rankings as links that previously didn’t count are suddenly used by Google.
Google would be wise to make a big announcement regarding this change otherwise webmasters could be tricked into violating Googles link selling guidelines by offering JavaScript links which actually pass PageRank.
You can get our blog posts delivered for free by email every day - simply add your email address to the box below or alternatively grab the RSS feed.







{ 22 comments… read them below or add one }
Interesting stuff although I’m not persuaded that they’ll be able to do this consistently. This will probably only serve to muddy the quagmire of “which links pass value” even further.
“there is no reason Google should count some links and discount others just because of the way they are implemented. From a users point of view if you can click on a link then it’s a real link and that’s how Google should see them too.”
Well, that might be not true, if the user has Javascript turned off in the browser. Therefore, I would expect Javascript links carrying less value than the regular HTML links.
I’m glad you mentioned the last part, I think some site owners are going to see a massive boost because of this, as long as Google can see the links. I know a few sites that have a lot of javascript links back to them due to widgets and so on, so I’ll keep track
Cheers,
Glen
I wonder if Google bot can parse jquery code as well or complex javascript objects with functions insight ?!
I guess since most of the time jquery.js is in external javascript file links generated by jquery or similar javascript frameworks will not be seen by Google Bot
That’s a shame… but probably google will improve its js support…
Hi,
I am wondering whether the much easier to follow links like
http://www.source_of_the_link_domain.com/linkout.php?target=www.target_domain.com
will pass any juice to the target-domain.
Any ideas?
Phillip
Find me on Twitter
If it’s a 301 redirect and the linkout.php script isn’t blocked in robots.txt then yes it will *probably* pass PR – Google is likely to have different rules for different sites though.
More comments from Patrick AltoftI was all set to publish this two weeks ago but then my host company vanished, my site disappeared from google and then I went on holiday. Anyway, I’ve been tracking how Google handles some links hidden by javascript: http://www.malcolmcoles.co.uk/blog/javascript-anchor-text-page-rank/
The upshot is that with JS-hidden links from two domains to one page, and plain HTML links from one domain to an identical page on a different URL, the former is the one that google is showing in its results. Even though all links to the first page are hidden by JS, it is the one that google is returning.
I’m assuming that, because the pages are identical, google is ignoring one as duplicate content. And because the one with only JS-hidden links has them from two domains, it’s treating that as the ‘real’ page.
Certainly a good news for designers/developers.. Google is now making their life hassal free
Hi,
Thanks for nice information.
This is a MASSIVE change! I can certainly confirm this is happening by looking at the new Google Webmaster’s Tools. On my site all pages which are linked to from my JS menu now show up as being linked to from pretty much every page. This is new to me and since I’ve implemented a lot of pagerank sculpting on the site, i will certainly be making internal structural changes to stop this happening..
woah! thought I had heard about this. good post!
Doing some dynamic links, and wanted to know if Googlebot can pick up on Javascript functions that are initiated by onMouseOver or onLoad or onBrowserEvent? What I am looking to do is make a static link that will be indexed by Googlebot and other spiders but also make users see the subsequent page as it was customized by my partner websites. Nothing blackhat, just changes to the look and feel of the subsequent page by changing the PHP link’s parameters with javascript.
So, essentially I am looking for an SEO intelligence report. Does Googlebot “tab” through links on a page, or does it use events like a mouse moving over a link as well?
I have phrased this question a couple of different ways in other sections but have not gotten a good response yet. Any help out there????
(PS–I have the code if you’d like to see what I mean)
Great news. Some murkier SEO techniques and link farms have been using Javascript to alter links post page load or use the onclick event to build up a URL in an effort to hide dodgy techniques and bad neighbourhoods from Google.
The closer Google can get to emulating with their spider everything a human sees and navigates, the less spam and greater link coverage we’ll see.
Dan
My guess is that Google is using some sort of open source javascript engine such as Rhino and that’s what is enabling them to read content inside of javascript code.
That great news, most of the links from social media sites are with JS so now they good for SEO…
ok that’s interesting. But we should never focus just on Google though they
are dominating the search engines and just reply getting on SEO is unbalance and risky. If for some reasons your site is being blocked by your hosting, then what you can do? I happened once in my ex-hosts and I did loose a lot of search engine traffic due to this BS settings. So I realize I couldn’t just rely on one method to get traffic.
Googlebot is still not able to extract and follow JS links created with variables, e.g.
document.write("Anch"+"ortext");Tested!
Could you please fix that?
Hi All,
First of all, thanks for this article, it’s very intgeresting indeed.
I’m still a beginner in SEO, but I am getting there step by step…
I have a question regarding this info on GBot & Javascript and how the whole thing works…
If you have the following
Ancre
And now “landing_page1.php” having a
My question is, will GoogleBot just read http://www.mydomain.com (so +1 backlink) and skip the rest ? or will GB read http://www.abc.com ?
Or is it SandBox material ???
cheers
Find me on Twitter
Useful information, thanks for sharing your knowledge Patrick!!
More comments from SujitOne of our programmers predicted this almost 8 months before this post or so. Very interesting. My opinion is that Google will someday index all forms of code and rank it according to how the browser renders the final version of the content. Its just a matter of time.
Do javascript internal link menus count as much as internal html links? I have a js menu that users can click to get to their state as the html links take up too much space, but since I switched to the js menu I have noticed that my ranking for each state has gone down.
So for the next week I am going to back to the plain old html links to see if I get a pop. The only issue is that I have completed many other on page SEO implementations so I won’t know for certain the answer to this question.
Please let me know what the consensus on this is.
thanks ahead of time
{ 1 }
Via delicious: JavaScript Links Now Passing PageRank & Anchor Text http://tinyurl.com/ngguvo
{ 13 trackbacks }
Leave a Comment (registration is optional)