What many surfers do not realise is that by giving their e-mail address on a web site, they are exposing themselves to the dangers of spam. Indeed, powerful computerised ‘spambots’ are used to extract e-mail addresses from web sites and store them in a database.
Once these e-mail addresses are plucked, you can expect all sorts of ‘useful’ e-mails ... And so, we will talk about spambots in this article. Or, rather: how to protect your e-mail addresses on your web site against spam .
|  |
Since spambots are looking for an e-mail address, you can use Javascript to cut your e-mail address into pieces . Then you can put these pieces together again using Javascript.
If your customer’s browser does not support Javascript or the customer has switched Javascript off, this method will not work, of course. The customer will not see an e-mail address. You can assume that the most popular browsers (Internet Explorer) use Javascript as standard. We will illustrate this method using a number of examples:
-
A basic example:
This will produce the following result: nospam@ipower.be
-
A better example using a clickable link:
<script language=javascript>
<!--
var username = "nospam";
var hostname = "ipower.be";
var linktext = "here to send us an e-mai";
document.write("<a href=" + "mail" + "to:" +
username +
"@" + hostname + ">" + linktext + "</a>");
//-->
</script>
This will produce the following result: Click here to send us an e-mail.
-
Use of in-line Javascript:
<A href="#" onclick="javascript:window.location=' mailto:'+'myemail'+'@'+'mydomain'+'.be'"> Link Text Here</A> Gives the following result: Link Text Here
-
Unscrambled generated Javascript:
<script>
<!--
function escramble(){
var a,b,c,d,e,f,g,h,i
a='<a href=\"mai'
b='nospam'
c='\">'
a+='lto:'
b+='@'
e='</a>'
f=''
b+='ipower.be'
g='<img src=\"'
h=''
i='\" alt="Contact us!" border="0">'
if (f) d=f
else if (h) d=g+h+i
else d=b
document.write(a+b+c+d+e)
}
escramble()
//-->
</script>
You can find a number of useful tools on the Internet for this. Look for the term ‘Javascript e-mail scrambler’. An example: http://innerpeace.org/escrambler.shtml
As you can see, there are several ways of using Javascript to hide your e-mail address. Which method should you use? The answer: all of them! As you can probably imagine, spambot designers are far from idle. They will find ways to sidestep these Javascript methods. In the future, spambots will be capable of detecting the most popular methods. And so, use various methods. Or even better: invent one of your own!
|
|  |
|  |
|  |
Another possibility is to use escape codes. This will make your e-mail address illegible, but your browser will still give the correct translation of the e-mail address.
An example:
<a href="mailto:%6eos%70%61%6d%40%69pow%65%72.b%65">Mail us</a>
This translates to: nospam@ipower.be
There are various sites where you can can have your e-mail address concealed. An example: http://www.healyourchurchwebsite.com/obfuscator/
In addition, you can also consult Google. Use the search term ‘e-mail obfuscator’.
As with the Javascript method, the rule is: use various types of e-mail concealment. You could also combine Javascript with e-mail concealment in order to make your e-mail address spambotproof.
|
|  |
|  |
|  |
One of the better methods is to use contact forms. This technique always works, whichever browser you use. You safeguard your e-mail address like this: it does not appear on the form. Moreover, spambots have no access to your server side code.
Here is an example: we always use ASP.NET (met C#) to draw up the web site forms. The programming code is contained in a dll (Dynamic Link Library) file. Spambots do not have access to this devised and illegible code.
If you look at the source code, you only see the following:
An e-mail address is nowhere to be seen!
There are hardly any disadvantages in using contact forms. Users will be less inclined to fill in information via a contact form because they think they will never receive an answer to their questions. An e-mail address that appears in their Outlook immediately is more direct. Moreover, they are unable to keep a copy of the message which they have sent. It is possible to implement a programme so that an automatic message is sent to the customer.
Sending forms is presently beyond the capabilities of spambots. You can therefore make use of a ‘View my e-mail address’ switch. Those who press this switch will be able to see your e-mail address. This reduces the detrimental effect of contact forms and gives users the choice of how they will send contact information. You will see an example of such a form on http://simon.incutio.com/contact/
|
|  |
|  |
|