Make your contact email address spam proof using javascript

Written on April 24, 2008 – 7:51 pm | by Sanil S

This topic might be interesting for blogger’s / tech geeks. Are you get annoyed by spam mails, because you published your email address on your blogs / contact page of your site. Here is a workaround for it, you can simply use some client side scripting to print the email address on the site document.

<script type=”text/javascript”>

var your_email_address = ‘your address’ + ‘@’ + ‘your domain.com’;

document.write(‘<a href=”mailto:’ + your_email_address + ‘”>Contact me</a>’);

</script>

Any change for email address display in user perspective?

Absolutely No! Since we are printing it into the document.

What we gain?

We can make the document spam proof.

You know how the spam bots works? It simply crawl your site and parse your document, during the parsingĀ  programs grabs all email addresses in source document. Spam doesn’t bother about the client side programs normally, moreover it need a client side virtual machine to execute the client side javascript code.
Thus your email address won’t displayed in the document. It is cool idea right?

Another workaround to make spam proof is adding your email address as image !!!

Post to Twitter Tweet This Post Post to Delicious Delicious Post to Digg Digg This Post Post to Facebook Facebook Post to MySpace MySpace Post to Ping.fm Ping This Post Post to Reddit Reddit Post to StumbleUpon Stumble This Post

If you enjoyed this post, make sure you subscribe to my RSS feed!

Enter your email address:

Delivered by FeedBurner

Posted in » Web

4 Responses

I am not sure this method will work – I have heard that many spam bots are running on Rhino – that can interpret javascript.


Binny V A on Apr 24, 2008 | Reply

@Binny..
If you are experiencing the spam just try out this. I know some of the bots did recognize javascripts, that is why I wrote “normally” in the last paragraph.


sanil on Apr 25, 2008 | Reply

best search engine google


pariVisse on Oct 22, 2008 | Reply

I was wondering about this – do you have any suggestions? I’ve done some research but haven’t been getting very far. Looking for some guidance I guess…


Sarah J. on Jun 23, 2009 | Reply

Leave a comment




Get Adobe Flash playerPlugin by wpburn.com wordpress themes