Make your contact email address spam proof using javascript
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 !!!
Tweet This Post
Delicious
Digg This Post
Facebook
MySpace
Ping This Post
Reddit
Stumble This Post
If you enjoyed this post, make sure you subscribe to my RSS feed!


Sanil S is a technology consultant, social media consultant and an entrepreneur from gods own country, Kerala. He blog regularly about...
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