Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

PageRank and links in an external javascript file

         

JS_Harris

2:33 am on Dec 9, 2008 (gmt 0)

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



I have a "random image" feature on my site that displays 4 random images which are linked to the pages they came from. The entire code is in javascript and it's all in an external file. If you "view source" you don't see the links or image locations.

I noticed that the G analytics content "site overlay" feature quite easily sees the links and returns how many people have clicked on which links. To do that Google has to be able to parse the external javascript file right?

Does that mean that if the external file has 100 random images with links I can expect to be sharing the internal pagerank 100 ways even if I'm only showing visitors 4 links? I would think thats the case since Google is reading the entire file.

tedster

3:47 am on Dec 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



PageRank calculations and Google Analytics are two very different things. Analytics builds up a set of statistics for you. But any time googlebot spiders that url, there would only be 4 random links showing, even if the algo did parse the external javascript.

And as far as I know, links in js still are not used for PageRank calculations. Even though Google certainly "can" parse javascript, they still do not do so automatically for all sites and all scripts - and that is what would need to happen for scripted links to be used in PR calculations.

JS_Harris

3:55 am on Dec 9, 2008 (gmt 0)

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



Thanks Tedster.

I used the javascript version of this handy random image generator in part because it didn't play with pagerank or search results. That would have been self defeating if it drained pr x100 with no benefit to anyone.

Still, if no links show up in the page code and Google finds 100 potential links in the javascript file I don't see how the spider would know to treat it as 4 links. I might rethink this feature since javascritpt is bound to be treated the same as xhtml someday.