4 ms·
I use a combination of reCAPTCHA Mailhide [1] and Javascript. By default I use the link to my "mailhidden" email. Then, some Javascript code [2] replaces that
by redmage 17y ago
I use a combination of reCAPTCHA Mailhide [1] and Javascript.
By default I use the link to my "mailhidden" email. Then, some Javascript code [2] replaces that link with a mailto link. The email is saved in the js file after being ROT13'd and encoded as HTML ASCII entities.
If the user has JS active, he/she sees a regular mailto link. Otherwise, he/she sees an http link to recaptcha and,
as long as the user's browser can display images, he/she can solve the captcha and see my email address.
You can see an example of this working in my personal site. [3]
Until spambots can run javascript or solve recaptchas, I'm safe. :)
[1] http://mailhide.recaptcha.net/ http://mailhide.recaptcha.net/
[2] http://ricardomartins.cc/js/email.js http://ricardomartins.cc/js/email.js
[3] http://ricardomartins.cc http://ricardomartins.cc
- DenisM 17y agoIs capthca even necessary?
- redmage 17y agoWell, it's not strictly necessary, I could have just used an image with my email address but that could be harvested by OCR-capable spambots (I think there are a few in the wild) and wouldn't be clickable. ;) With the captcha, I can be fairly sure that a human solved it (reCAPTCHA is particularly good at filtering bots, afaik) and the user gets a clickable link. In any case, that's just to accomodate browsers without Javascript or with it disabled. I believe most people have Javascript enabled, so they'd get a regular mailto link.