For ages now, I've been developing a tool / jQuery plugin that has certain features, not worth mentioning in this thread.
I'm now contemplating on trashing vast parts of it, except one feature, which a webmaster that uses it really cherishes:
- Increasing site PageRank by altering selected outgoing links (only some of them - not all of them).
(We've measured, that the technique really works)
Most notably, links to high PR sites needn't forward PageRank.
Quite a few webmasters would prefer to keep their PR on the site, rather than throw it at e.g. Twitter / Facebook.
Question 1: What's the most recommended technique for doing this? (I've read about employing iFrames or JavaScript links)
Question 2: I would prefer to use a generic JS technique and maybe simplify my existing tool to just be a pure jQuery plugin or conventional JS, that does nothing but mask these links.
What syntax do you reckon would be the best?
Regarding question 2 - please let me state some requirements:
- Search engines have no way of parsing the JS links - otherwise, this could result in either PR being forwarded, making the solution useless, or even a penalty.
(That can partially be achieved by disallowing the spider to crawl the JS in robots.txt)
- Arbitrarily complex links can be substituted generically, for example the following standard "Twitter Button" link:
<a href='http://twitter.com/share' class='twitter-share-button' data-url='... data-count='horizontal' data-via='...' data-related='pubcon' data-text='...'>Tweet</a>
A solution to question 2 that comes to my mind is simply substituting '<' with '[' and '>' with ']', delivered as text nodes similar to what "BBCode" does prior to server-side substitution.
That could be parsed rapidly and with a simple algorithm (e.g. using a simple RegEx for the substitution) in pure JS, allowing for complex links to be replaced.
After reading your post a few times, I'm not sure what your question is. According to your title of the post, you want to make links with Javascript but then answer the question yourself that spiders cannot parse Javascript links. They can perform the action required to make it work.
Can you clarify what your asking?
MY BLOG:
HTML Code:
<a href="http://teststuff.freehostingcloud.com">click here to read my game progress</a>
Google crawls and, at least to some extent, executes JavaScript. They've been a bit schizoid about how they treat links generated by JavaScript. They definitely follow such links, but they don't necessarily allow them to pass PageRank. At one point, for example, they recommended using JavaScript for paid ads specifically because those links would not pass PageRank. However, there have been some reports that indicate some JavaScript links might be passing PageRank, which muddies things up.
The latest information I could find indicates that Bing still doesn't parse JavaScript and they actively discourage webmasters from relying on them. Heaven only knows about Ask.
In any case, I wouldn't count on JavaScript links with regard to SEO benefits. In addition, I wouldn't put any effort into altering links to try to hoard or funnel PageRank within a site. If it's a case of a site-wide list of links, then it might make some sense to use an <iframe> to pull in a page of such links rather than replicating them on every page, but otherwise you'd probably be far better off using the time to make your site better.
According to an seo book, this is a reason to avoid things lie JavaScript drop downs is because a spider cannot execute the action required for a drop down to occur . If someone is performing a rollover or something of that simplicity, I urge you to use CSS. More people then you realize either do not use javascriot
MY BLOG:
HTML Code:
<a href="http://teststuff.freehostingcloud.com">click here to read my game progress</a>
So the bottom line is, that search engines don't encourage such practices and it is probably against Google Guidelines, right?
I was surprised, that while googling for for something similar, not many significant hits were to be found.
Is demand for such a technique so low?
Just wondering, when thinking about the perfect search engine bot, I would have it look at the page after its load in a suitable virtual machine.
(do you know what I mean: comparing the raw HTML to post-load HTML)
They might not be doing it yet, but do you reckon they'll do that in the future?
I personally don't think parsing JS is reliable from search engine point-of-view, because you could e.g. defer some work to a central server, in combination with JS, that initiates and delegates the job.
That would be completely invisible for any spider.
So iFrames are an option, too, but I suppose that if someone has JS disabled, things get messy (or what does the user see?).
Afa the solution I was thinking of is concerned, the alternate links would be visible to users who have JS disabled - at least one disadvantage.
I'm just amazed that there is no official way to link to content without forwarding PageRank.
(that used to be the case with the old "nofollow")
Bookmarks