Bots are relentless but I found a way to beat them.
I received a message on my contact form on this website, but it clearly looked like spam. I always wonder why some websites use a contact form rather than just providing an email address for contact that way. I prefer to email since I get a record in my sent items. I realize it is so I don’t need to expose my email address. Modern email hosts filter spam fairly well, but using a contact form still makes sense to hide your email and for other practical reasons.
I came up with a quick solution. First thing I thought of is to make my contact information into an image. This should prevent most bots from looking for key signs of an email address that can be easily parsed. However, I can understand it would be preferable for visitors to be able to copy and paste that email. Some smartly designed websites use a copy icon; something like this: ⿻. I was able to code some JavaScript so clicking on the email will copy it to the clipboard. If you look at the JavaScript code, you’ll also notice that I obfuscated my email address so scrapers can’t easily interpret my email address.
Even though I blogged about this and revealing the method I used, unless someone is really determined to send me spam they’ll need to put some effort into it. I doubt low-paid scammers will profit from it and AI is still not at a level to see through these simple measures. It’s just an exercise for me to see what I can do with web programming which I haven’t dabbled with in 20 years. Website development has changed a lot since the early days when most people knew that WWW is *short for World Wide Web (*ironically, it takes longer to say.)
Simple tricks can still outsmart spam bots.