|
Support Library > General Information > Stopping Email Address Harvesters
Stopping Email Address Harvesters
Email harvester programs scan web pages looking for mailto tags, which are followed by email addresses, and they collect the email addresses and add them to mailing lists. Companies who send unsolicited (junk) email use these lists to send people tons of email that they don't want.
Two scripts are available below to help prevent email harvesters from collecting your email address. Option 1 places a button on your page that the site's visitor can click to send mail, and Option 2 places a text link on your page instead of a button. These scripts hide the email address from harvesters and builds the mailto tag only when the button or link is clicked so legitimate visitors can easily email you.
|
|
Option 1
Button Display:
Grab the code:
<script language="JavaScript" type="text/javascript">
<!--
var Domain = "mydomainname.com"
var Mailme = "mail" + "to:" + "sales@" + Domain
document.write("<FORM>");
document.write("<INPUT TYPE=\"submit\" VALUE=\"Email Sales\" ");
document.write("onClick=\"parent.location=Mailme\"> ");
document.write("<\/FORM>");
// -->
</script>
Copy and paste the code above into your page and edit it by changing the domain name ("mydomainname.com") to yours, the user address ("sales@") to the appropriate email address at your domain, and the button text ("Email Sales") to meet your needs.
Important Note: If you have more than one script per page you will need to make an additional change to the code. There can only be one variable (var)
called "Mailme" per page. So if you put a second script on the same page for a another email address, you can call it "Mailme1", without the quotes. Be sure to also change "parent.location=" to "Mailme1" as well. This way you can have as many buttons (or links) on a page as you like. Just up the number after Mailme by one (Mailme1, Mailme2, Mailme3, etc.) for each button or link that will appear on the same page.
Option 2
Text Link Display:
Grab the code:
<script language="JavaScript" type="text/javascript">
<!--
function doNothing() {
// This function does nothing!
}
var Domain = "mydomainname.com"
var Mailme = "mail" + "to:" + "feedback@" + Domain
document.write("Send comments to: <a href=\"javascript:doNothing()\;\" ");
document.write("onClick=\"parent.location=Mailme\">");
document.write("Feedback");
document.write("<\/a>");
// -->
</script>
Copy and paste the code above into your page and edit it by changing the domain name ("mydomainname.com") to yours, the user address ("feedback@") to the appropriate email address at your domain, and the text link ("Feedback") to meet your needs. You can also change the text that appears before the link by editing the words "Send comments to: ..." to meet your needs.
|
|