Forum Moderators: phranque

Message Too Old, No Replies

Obfuscating Email Addresses: Best Methods & Implementation?

To keep out the harvesters

         

engine

2:40 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Obfuscating a displayed e-mail address shown on a website is one way to help cut the risk of harvesters.

I've used the good old ASCII code, but i'm not sure that is so successful nowadays. I've tried javascipt, but i'm not sure how well that is working as it's used where the published e-mail addresses appear elsewhere.

Besides not showing the e-mail address at all, what methods and implementations have you found to be most succesful in keeping out the spambot harvesters?

BeeDeeDubbleU

2:53 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have been using this simple script that I found recently. It seems to be working so far but I don't know how long it will last.

<script language="Javascript">
<!--
var firstbit = "johnwidget"
var secondbit = "yourdomain.com"
document.write("<a class=link href='mailto:" + firstbit + "@" + secondbit + "'>")
document.write('CLICK HERE TO EMAIL US')
document.write("</a>")
//-->
</script>

onlineleben

3:49 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can combine the javascript above with code generated from an email-obfuscator. E.g. engine translates to #101;&#110;&#103;&#105;&#110;&#101; and this in combination with javascript is quite OK.
On the other hand, robots like googlebot etc can read this (I checked on the cache for a page where i have an obfuscated email address), so probably the more professional harvesters do as well.

Maybe placing a picture with no maillink is the wa to go.

coopster

7:37 pm on Oct 24, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I have been using the method described in this discussion regarding Hiding e-mail address [webmasterworld.com] for quite some time now with great success. Basically if the user has JavaScript enabled it will build the email address on-the-fly and changed the href attribute to a
mailto:
format. If JavaScript is not enabled, the contact.htm page explains to them how to contact the email address they clicked (the contact.htm is a step-by-step instruction page on how to put the email address together because we recognized that they don't have JavaScript turned on in their browser and we appreciate their patience as we combat spam using this method).