Avatar of Paul McCabe
Paul McCabe

asked on 

Prevent / reduce email harvesting using an image – javascript approach ?

Hello Experts,

I am in a position where I need to make an email address visible on a website. Naturally, I’d much prefer not to have it harvested by spammers, or at least significantly reduce that possibility. I have an idea on which I would appreciate an opinion:

From the online research I’ve done, displaying an image of the email address would seem to be one of the most efficient ways of protecting it (I understand it is technically possible to optically scan such an image, but at this point in time is too resource-intensive for the vast majority, if not all web scraper bots).

However, the image approach puts a significant burden on users, as they have to manually type in the address in order to send a message. So it is not an ideal solution.

Now, I understand that bots typically don’t read javascript (again, too resource-intensive). This makes me wonder if it would make sense to work JS so that clicking on the email image brings up the user’s email client and inserts the email address into the “To” field, as would happen with a regular email link ? For clarity, following the image click, JS would do all of this, not anything in the HTML / CSS code. And JS would not display the email address on the page as I have seen with other strategies. The address would only be displayed by the image on the web page.

My online research didn’t turn up any discussion on this specific tactic, so, I thought I would post it here to ask if anyone has any experience using this method, or otherwise would appreciate comments from anyone familiar with this sort of scenario.

Incidentally, I am fully aware that this would not be 100% effective, but I reckon taking some measures is better than nothing. Also, I realize that this would not work for users whose browser has JS disabled, but at least they would be still able to see the email image.

Avatar of undefined
Last Comment
Paul McCabe

8/22/2022 - Mon