Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I use this trick to mask email addresses in mailto: links, i.e. something like:

    <a onClick="this.href=
        ['mailto',[['john','doe'].join('.'),
            ['gmail','com'].join('.')].join('@')].join(':')"
		href=#click-to-email>
I don't know how good my solution is in protecting from spammers' scrapers but I'd be happy to hear about any alternatives.


Your logic is flawed for bots that parse and render the pages. I have ran a small blog that I hand wrote from scratch and in the process found that around 4 years ago any phishing/spamming/harvesting bot worth it's salt will render the pages leaving these types of clever fix hacks useless.


The email address is "rendered" only on mouse click in my scheme, and something suggests bots don't go as far as clicking around on each page.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: