View Full Version : can spiders follow JavaScript links?
tomchu
08-26-2005, 02:18 PM
Can search engine follow this kind of links?
<a href="javascript:launchWin('/popups/popup_emoticons.cfm?formname=messageForm&fieldname=message','Emoticons',500,520,0,0,1);" class="highlighted">XXXXXXX</a>
Thanks
:confused: Tom
--------
Mikkel deMib Svendsen
08-26-2005, 02:42 PM
The link in your example they could, in theory, follow it but don't coult on it :)
Your example was a very simple JavaScript but there are so many others that aren't and that are virtually impossible for engines to follow - so, in general they don't follow links in JavaScript. At least, it's not a very good format to use for general linking - direct HTML (a href) text links still works a lot better.
Chris Boggs
08-26-2005, 02:55 PM
interesting related topic on the use of PHP to help...here (http://www.geckotribe.com/seo/rss-for-seo.php)
Mikkel deMib Svendsen
08-26-2005, 03:05 PM
Are you sure you are linking to the right page? I don't see anything related to JavaScript links :)
In any case, PHP is, like ASP, a server side language and therfoe cannot substitute client side scripting such as JavaScript and have it work the same way.
Chris Boggs
08-26-2005, 04:05 PM
your response is what I was aiming at Mikkel...did you see the last part which I felt was related to this topic somewhat?
Avoiding giving away PageRank
The final point we'll cover in this article is how to avoid giving PageRank away to the articles the newsfeed links to [More information: "Do outbound links siphon off PageRank?"]. Before you continue, you should consider skipping this step. After all, if you're using someone else's content to optimize your site, giving them a little PageRank is a good way to say "thanks". Even if you don't give them PageRank, you'll still be sending them traffic, but you'll have to consider whether that's fair compensation.
If you do decide to keep all of your PageRank, you can do so by changing the links to JavaScript links. To do that, first copy the following JavaScript code and paste it into the <head> section of your webpage:
<script type="text/javascript">
function OpenNewsWindow(url) {
theWindow = window.open(url, "News", "directories=no, menubar=no, scrollbars=yes, status=no, toolbar=no, resizable=yes, width=600, height=400");
if (window.focus) theWindow.focus();
}
</script>
Then, change the PHP code in your webpage as follows (note that "image" and "date" in the "iorder" line require CaRP Koi or CaRP Evolution, but won't hurt when used with CaRP GPL):
<div id="seonewsfeed">
<?php
require_once "/your/path/to/carp.php";
CarpConf('iorder','image,url,title,author,date,des c');
CarpConf('biurl','<h3><a href="#" onClick="OpenNewsWindow(\'');
CarpConf('aiurl','\'); return false;">');
CarpConf('ailink','</a></h3>');
CarpCacheShow('your newsfeed URL here');
?>
</div>
There you have it! Search engines no longer treat the headlines as regular links, so none of your PageRank gets bled off by the newsfeed. Finish up the process by using CSS and/or CaRP settings to do any additional formatting that may be needed to make the newsfeed fit the lok of your page, and you'll be on your way to better search engine placement.
Mikkel deMib Svendsen
08-27-2005, 04:06 AM
LOL that is probably the most complicated solution to a very simple problem I've seen for a long time - and still, has only little to do with the subject of this thread :)
You can't be sure any engine will follow JavaScript links - on the other hand, you can't be sure they won't. So it's a highly insecure way of blocking engines.
This thread is, as I understand it, about how to GET engines to follow links - not how to block them :)
Chris Boggs
08-27-2005, 10:21 AM
I apologize for my ignorance in these matters, Mikkel. As you can probably tell I am not a developer. I felt that these were related in a sense that maybe something in that code could be "reverse engineered" or something to derive the answer to the initial question. Thanks for pointing out my fallacy...I have learned something new today. :)