View Full Version : Shrouding Links in Javascript


Pyrrhonist
03-12-2004, 06:04 PM
There's some discussion going on in the Google forum about how to mask links from being read. I've seen a couple different ways of doing this using Javascript, but most of them span multiple lines, and are quite annoying. Here's one way that we've tried using to mask url's from being read, and hopefully it won't leak the PR.


<a href="javascript:location.href='http://www.seo-guy.com'">SEO Optimization</a>


What I'm not sure about is where the Page Rank is calculated in the iteration cycle, and whether the PR is lost passed to the other links, as we are hoping it will.

If anyone knows other ways of doing this, that don't leak or lose PR, please post them up here for us to see. Also, if you have an idea about what is really happening, please feel free to post.

SEO Bob

digitalpoint
03-12-2004, 07:41 PM
Personally, I prefer not using JavaScript links at all (plus, Google is working on a new version of the Googlebot which will understand JavaScript).

Instead, you can make absolutely certain you don't pass PageRank by doing it with a simple script that does a 301 or 302 HTTP redirect, then put that script into your robots.txt so it's not even able to be spidered...

I wrote a little blurb about it here...

http://forums.digitalpoint.com/showthread.php?t=19

- Shawn

Pyrrhonist
03-12-2004, 08:15 PM
I like how clean the way that you suggest is, but my concern is that if you do that, then all the potential page rank is still passed on... to your empty page. (if i'm reading this properly).

Of course, the only reason that we would shroud a link is for affiliate links, but I'd just as rather give it to them then to see it disappear down the drain forever.

- Bob

digitalpoint
03-12-2004, 08:45 PM
I don't think PR is passed on to pages Google can't spider. But I could be wrong... I'll wait a month or so and see if my script registers a PageRank value (although I doubt it would).

- Shawn