Make your contact email address spam proof using javascript
![]() |
Post Page Rank |
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 !!!
If you enjoyed this post, make sure you subscribe to my RSS feed!


3 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
Leave a comment