Protect email address from spam

How to protect email email addresses in web pages from spam?

If you use HTML clickable email display on a webpage like mailto:somewhere@example.com , you will end up a lot of spamming.

http://techblog.tilllate.com/2008/07/20/ten-methods-to-obfuscate-e-mail-addresses-compared/

1. Hiding email address with CSS:

Using CSS display:none

<style type=”text/css”>
p span.displaynone { display:none; }

</style>
<p>silvanfoobar8@<span class=”displaynone”>null</span>tilllate.com</p>

p span.displaynone { display:none; }</style><p>silvanfoobar8@<span class=”displaynone”>null</span>tilllate.com</p>
</p>

2. Scrambling email addresses.

If you want to improve your chances even more you can embed the ASCII code in JavaScript. This code will create a mailto: link where it’s placed in the body section of the page.<script type="text/javascript">
<!--
document.write("<a href='mailto:put your scrambled address here'> Contact me!</a>")
// -->
</script>

Read here detail: http://www.golivecentral.com/pages/txttut/scramble.shtml

3. Inserting Text with JavaScript

<SCRIPT TYPE=”text/javascript”>
emailE=(‘yourname@’ + ’emailserver.com’)
document.write(
‘<A href=”mailto:’ + emailE + ‘”>’
+ emailE + ‘</a>’
)
</SCRIPT>

Read here detail: http://joemaller.com/js-mailer.shtml

4. Embedding javascript code

<script type=”text/javascript”>// <![CDATA[

document.write(‘<a href=”mailto:info’ + ‘@’ + ‘mail.com”>’ + ‘info’ + ‘@’ + ‘mail.com</a>’);

// ]]></script>

Or you may use these options:

  • Use graphics in displaying addresses
  • Use flash in displaying addresses
  • Use javascript or php contact forms
  • Please share it
    Email this to someoneShare on Google+Pin on PinterestTweet about this on TwitterShare on LinkedInShare on Facebook