[thelist] window.self question

Joshua Olson joshua at waetech.com
Mon Nov 24 12:28:19 CST 2003

----- Original Message ----- 
From: "michael grover" <mike at michaelgrover.com>
Sent: Monday, November 24, 2003 12:43 PM

> Certain paid-for links on my site are getting hammered by spiders.  I
> have the idea that I can hide the links behind javascript and thwart the
> more stupid spiders.  But, I can't figure out how to use javascript in
> such a way that it won't go about opening a new window.
> Here's what I start with:
> <a href="#" onClick="window.open('target_page.html',''); return
> false;">Paid-for link</a>.

Along the same lines, try:

<a href="#" onclick="top.location.href = 'target_page.html'; return
false;">Paid-for link</a>

> Any ideas?  Or, any other ideas for how I can obfuscate these links from
>   spiders while still making them usable by humans?

This technique precludes non-js users from following the links.  If that is
acceptable then you are done.  If not, then you may consider making this
link a form submittal rather than an anchor.  Look here for an example:


Joshua Olson
Web Application Engineer
WAE Tech Inc.

More information about the thelist mailing list