[Web4lib] Mailto: links that can't be harvested by spambots?

Nicole Engard nengard at jenkinslaw.org
Tue Feb 20 07:53:41 EST 2007


Hi all - have any of you considered using PHP?  We have our staff
contact info in a MySQL table and are using their ID (just a
auto-generated number - nothing that really identifies us - like our
employee IDs) to get their email address.

We have been using JS for years, but we're still getting massive amounts
of spam.

I found this a few months ago:

http://forums.devshed.com/php-development-5/header-mailto-274158.html?&h
ighlight=mailto

And then took the idea to the next level.  It's not live yet (still
waiting for everyone to update their contact info) - but it works
beautifully.  I've attached the necessary snippets of code for you all
to see if you're interested.

Nicole C. Engard
http://web2learning.net
http://www.jenkinslaw.org
 

-----Original Message-----
From: web4lib-bounces at webjunction.org
[mailto:web4lib-bounces at webjunction.org] On Behalf Of Tim Spalding
Sent: Sunday, February 18, 2007 7:59 AM
To: web4lib at webjunction.org
Subject: Re: [Web4lib] Mailto: links that can't be harvested by
spambots?

Javascript obfuscation works very well. The chance that someone will
mention the library emails elsewhere-forum, a resume, etc.-is a thousand
times higher than the chance someone will write a bot that defeats your
JavaScript.

Here's a simple one that both writes the email and a mailto: link around
it.

<script language="JavaScript" type="text/javascript">

function printemail(address, domain)
{
document.write("<p><a href='mailto:" + address + "@" + domain + "'>" +
address + "@" + domain + "</a></p>"); }

printemail('tim', 'librarything.com');
printemail('abigail', 'librarything.com');

</script>

There is a slight drawback to JS techniques-they're not fully
accessible. If the user has JS turned off, the links vanish. That's
rare, but, in the real world very many people don't have their system
configured to make mailto: links work. (Generally they use a web-based
ap, but the mailto still points to the default desktop ap.-probably
Outlook.) This isn't just grandma. I don't have mine set up either!
(Side note; This is also why you should never ever have a mailto: link
under innocuous text like "contact.")

In my opinion the best solution is to just show the email. Give the user
the work of putting it into their email program. They won't mind.

To show it safely, use a graphic in place of the at sign. Then give it
descriptive "alt" text for blind-accessibility like:

tim<img src="http://www.librarything.com/pics/squiggle.gif" alt="[at
sign]">librarything.com

Best,
Tim

On 2/18/07, David Rothman <david.rothman at gmail.com> wrote:
> Links below feature scripts (or tools which generate scripts) that are

> claimed to generate mailto: links for a page that is viewable to the 
> user, but that cannot be harvested by spambots.
>
>
>    - http://www.willmaster.com/possibilities/demo/aelgwase.html
>    - http://www.joemaller.com/js-mailer.shtml
>    - http://med.stanford.edu/irt/web/clips/javascript-antispam.html
>    - http://www.seoconsultants.com/tools/email/
>    - http://mailtoprotector.com/
>
>
> Any opinions on whether or not this sort of solution is effective?
> _______________________________________________
> Web4lib mailing list
> Web4lib at webjunction.org
> http://lists.webjunction.org/web4lib/
>
_______________________________________________
Web4lib mailing list
Web4lib at webjunction.org
http://lists.webjunction.org/web4lib/


More information about the Web4lib mailing list