Javascript links are they taken into account?
Can I use JavaScript to add links that will not be included in the flow of PageRank?
If they are easy to interpret - because Google can execute JavaScript code - they are taken into account as regular <a> tags and may even pass PageRank to the page that is linked.
A JavaScript link is typically a link like this:
<span onClick="location.replace('http://www.scriptol.com/seo/')" />Anchor</ span>
or with an image:
<img src="image.jpg" onClick="location.replace('http://www.scriptol.com/seo/')" />
It is then easy to interpret these links to search engines.
We know as this has been confirmed by Matt Cutts, the Google spokesman about referencing issues, especially the second point:
- JavaScript links are used to discover and to index pages by search engines.
- JavaScript links can pass PageRank.
- And so they are treated as HTML links.
Conclusion
Using JavaScript code is not the best way if you want to place links for visitors and not for search engines, such as a link on a registration form that you do not need to let indexed.
To do this, JavaScript code to make the URL invisible to search engines.
See also