FrontPage Tips by Ward Cameron Enterprises
Take Your Web Site to New Levels
Spider Proof Your Email Links
Are you tired of spam spiders collecting your email addresses
from your web pages only to leave you bombarded with unwanted
pitches for herbal viagra?
You CAN prevent this from happening by replacing your standard email
links with a few simple lines of javascript code.
How does this work? When you insert links into your web pages, they are
placed into the HTML code using the following syntax:
<a href="mailto:info@website.com">Product Info</a>
This HTML code tells the web page what name to display and what email
address to place in your email window. In this case, the
words Product Info will appear underlined and the link will open
your email window with the address info@website.com already entered.
The problem lies in this standard HTML code. Spammers send out
automated programs called spiders that scan the Internet for this HTML
code and strip out the email links. These links are added to their spam
lists. Before you know it, you are being inundated with spam.
Instead, use the following process to replace your standard links with
spider-proof links.
In your FrontPage Normal Window, place the cursor where you would like
the link to appear. Then switch to the HTML window and type the following
code exactly where your cursor already appears:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
user = "user";
site = "website.com";
document.write('<a href=\"mailto:'
+ user + '@' + site + '\">');
document.write(user + '@' +
site + '</a>');
// End -->
</SCRIPT>
Your email address will now appear as a hyperlink when your web
page is viewed online, but it will NOT appear within the source
code. This will beat the spam spiders.
Customize the Code
Sometimes you would like a link to appear with custom text such as
Product Info. When the link is clicked, it opens a blank email with
the appropriate address already loaded. To accomplish this, make a simple
change to the above code. Use the following syntax:
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
user = "info";
site = "website.com";
link = "Product Info";
document.write('<a href=\"mailto:'
+ user + '@' + site + '\">');
document.write(link + '</a>');
// End -->
</SCRIPT>
In this case, your link will display the text under the link text, but
the target will display the correct email address.
One thing to keep in mind though. If you use this technique, your
custom links can appear with any text you wish. This can make screen
viewing more convenient, but if you plan on people viewing your page you
should use the technique described in the first section. This will make
sure that printed pages show the actual email address, not the text name -
they won't be able to discern the actual address from the printout.
These tutorials are part of an upcoming training course called
"FrontPage Magic - How To Create A Database Driven Website For
Non-Programmers". Stay tuned for more details on this exciting new
product.
Send your tips to .
All materials Copyright
© Ward Cameron All Rights Reserved