One of the ways that eMail spammers collect the addresses they use in their mass mailings is by harvesting them with Web crawling software from "mailto" links on Web pages. This can be, if not prevented, at least made more difficult by disguising eMail addresses included in Web pages. The WebOps group has made it possible to include this protection in Library Web pages *.
Normally, you put an email link in a page in the following way:
eMail your comments to
<a href="mailto:nobody@www.bogus.com">the Webmaster</a>
The result looks like:
eMail your comments to
the Webmaster
You can now achieve the same result without leaving a mailto link in your HTML that can easily be picked up by an address harvester.
First, you need to add one line to the head of your HTML document:
<!--#include virtual="/ssi_antispam.html"--> For instance, the HTML in the page you're reading right now begins:
<html>
<head>
<title>University of Waterloo | Library | Preventing eMail Address Harvesting</title>
<!--#include virtual="/ssi_staff_head.html" -->
<!--#include virtual="/ssi_antispam.html"-->
</head>
Second, replace:
eMail your comments to
<a href="mailto:nobody@bogus.com">the Webmaster</a>
with:
eMail your comments to
<script type="text/JavaScript">
writeEmail('nobody','bogus.com','the Webguru');
</script> The result will still work in the browser as a normal "mailto" link. This technique is actually used in the link to Web Operational Management Group at the bottom of the current page. You will see this if you use the View Source command in your browser to look at the bottom of this page.
*Please note: This method applies to files on the "library" server. For files on other servers, you may subsititute the <!--#include virtual="/ssi_antispam.html"--> statement with the following codes:
<script type="text/javascript">
function writeEmail(username,domain,displayText)
{document.write('\x3Ca href=\"mailto:'+username+'@'+domain+'\">
'+displayText+'\x3C/a>');}
</script>