Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Javascript Code that Prevents Spam
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Javascript Code that Prevents Spam

 Post Reply Post Reply
Author
Misty View Drop Down
Senior Member
Senior Member
Avatar

Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
Post Options Post Options   Thanks (0) Thanks(0)   Quote Misty Quote  Post ReplyReply Direct Link To This Post Topic: Javascript Code that Prevents Spam
    Posted: 23 October 2004 at 1:09am

I have the following Javascript code on some of my web pages:

<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Original:  William Rozell Jr  -->
<!-- Web Site:  http://www.elranzer.com -->

<!-- Begin

var user;

var domain;

var suffix;

function jemail(user, domain, suffix){

document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">' + user + '@' + domain + '.' + suffix + '</a>');

}

//-->

//  End -->

</script>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin

jemail("info", "anywhere", "com");

//  End -->

</script>

Do you think it really prevent people from getting junk emails? I get a lot of junk emails. :(  Does anyone know how effective the above code is?



Edited by Misty
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2004 at 2:21am

Run the page in a Lynx browser. If you can read an email address in Lynx, so can a spambot. Some people urlencode the mailto:@xx.yy.com, but I think some spambots check for the url encoding.

Here's an alternative method I haven't tried.
http://jamesthornton.com/software/redirect-mailto.html

Never had spam come in for a mail address that was used in a form action script.

Couple of things... spammers never retire an email address, so hiding an existing one is of little value. I have an email address that has not been published anywhere since 1991 - before graphical browsers were developed. I get about 40 spams a month to it - keep it around just to count the spam - lol.

I pay my registrar $1/year/domain to hide contact details including email adress from whois searches. They create an email address for the contact info that changes every xx days. They reject any non-domain/icann related email and forward valid mail to an address I gave them.
This protects against casual queries, but if a spammer is energetic enough to do a dns scan for the domain on your name servers, they can still get a valid email address - Run goawaynow.com into http://www.domainwhitepages.com/ to see what I mean.

Also, never use a catch-all email acount. Mail sent to an account that doesn't exist will then kick-back. Valid senders will see it and try again after checking the address. You won't miss any email if you don't have a catchall account.

Note: - Per ICANN, you have to have a postmaster@xxx.yyy addresss so you can be contacted regarding domain issues. Over the past year or two, They've been using it to verify domain ownership and if you don't respond, you can loose your domain. You should also have an abuse@xxx.yy account, and a webmaster account is very optional. I usually alias abuse and webmaster to postmaster, and forward all postmaster accounts to an address that has excessive spam control.



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.