Hide your e-mail address

Created - May, 2002 - bweir.com

This is a way to keep your full e-mail address from appearing anywhere in your code, but still allowing it to display on your page. This way a web crawler cannot extract your e-mail address from your source code.

 

here is the code:

<!-- COPY AND PASTE THE CODE BELOW INTO THE YOUR PAGE AS INDICATED......-->
<!-- THIS SCRIPT WILL KEEP WEB CRAWLERS FROM GETTNG YOUR E_MAIL ADDRESS.-->
<!-- THIS SCRIPT IS BY NO MEANS FOOLPROOF BUT WILL STOP MOST CRAWLERS...-->

<!-- COPY THE CODE BELOW INTO THE HEAD OF YOUR PAGE -->

<script language="javascript">
<!--

fakeMail='yourEmailName' + '@' + 'yourDomain.com';

// Place your e-mail name - e.g. JQPublic - in the first set of single quotes
// Place your domain - e.g. aol.com - in the second set of single quotes

//-->
</script>

<!-- END SECTION TO COPY INTO THE HEAD -->

<!-- Place the code below in the body of your page where you want to write your e-mail address -->
<!-- If you want the text that appears on the page to be different from the e-mail address, -->
<!-- then change the second - fakeMail - to the value that you want the user to see, but -->
<!-- make sure you put this new value in single quotes since it is now a string literal -->

<!-- COPY THE CODE BELOW INTO THE BODY -->

<script type="text/javascript">document.write('<A href="mailto:' + fakeMail + '">' + fakeMail + '</a>')</script>

<!-- END SECTION TO COPY INTO THE BODY -->