Readable non-harvestable email addresses with CSS
Stupid hack I’ve just thought of. My email address is:
@silogenixkry.org
Spam harvesters looking at that will see the following code:
<p style="padding-left: 5em"><span>@</span><span
style="margin-left: -2.5em">sil</span><span
style="margin-left: 3.5em">ogenix</span><span
style="margin-left: -5.3em">kry</span><span
style="margin-left: 4.1em">.org</span></p>
Or, with HTML stripped, @silogenixkry.org, which ain’t an email address. It does it by breaking up the address into bits, putting the bits into HTML in the wrong order, and reassembling the bits into a readable order with judicious use of CSS.* It requires a certain amount of fiddling to get the margins right such that (a) the address shows up in the right order and (b) changes in font-size don’t screw it up. I’d write a tiny web-service to do it to a supplied address if I could be bothered; lazyweb, go for it. Of course, if everyone uses this, harvesters will learn how to interpret CSS (and this is relatively trivial to do in this case). Might keep your name off the lists for a little while longer, though.
Why not using hidden text instead, like this:
firstname.lastname<span style=”display:none”>SPAM</span>@gmail.com
I think this is less prone to problems with different text fonts and sizes.
Regards,
Denis
44 minutes later
Too bad it doesn’t work when you’re aggregated, eg on Planet Gnome, where most of your readers probably are ;o
46 minutes later
It’s a clever trick. Unfortunately, it will keep both spambots and people with vision impairments from being able to email you.
82 minutes later
And the exact point of this trick is? The “user domain tld” syntax is actually more useful if you need to hide your email but I tend to just provide a clickable mailto link. The spam is my problem not the reader’s. Especially as my email address is already visible in thousands of places like commit messages, NEWS files, MAINTAINER files etc.
2 hours later
whatever
2 hours later
I read Planet Gnome with the RSS feed, and the RSS feed for your site has a messed-up address. So it doesn’t work.
3 hours later
I love this idea because it’s using the spammers’ own techniques against them.
3 hours later
Dude - need I remind you of the “A” word?
7 hours later
Nice idea, but unfortunately not that useful:
1) it is not a general solution, but a single one - you must recalculate styles for each email address
2) you can not copy the address and paste it, since you are copying the text and not how it looks like
:)
12 hours later
Stu, if you copy and paste email addresses like I do so that it doesn’t open fecking outlook you get silogenixkry.org so Users might not notice that they have it wrong as they think mmm I copied it correctly and I pasted it therefore it is correct and don’t actually check.
13 hours later
If you’re going to make it unreadable for screenreaders anyway, why not just use an image?
13 hours later
It’s a nice idea, but I these days I think it’s very much a case of solving the wrong problem. As has been mentioned already your email address is going to be on spam lists no matter what, so put your efforts into training your spam filters :)
14 hours later
sitting in the library using firefox on windows, and this comes out wrong (in different ways) on planet gnome and your blog, just fyi
16 hours later
As others have said - accessibility is an issue here - you’re assuming that human eyeballs are the only thing reading your code.
It’s a nightmare trying to defeat spambots - but I’ve resigned myself to logical captchas - i.e. basic mathematical questions, or linguistic ones.
e.g. - my contact page here: http://www.monkeyfood.com/contact.php
26 hours later
brothercake: yeah, I know. AFAICT there’s no way of making an email address accessible but not harvestable, unless you know something I don’t. This was a two-minute thought, and it ought to be possible to make it better this way than to just use an image like too many people do.
41 hours later
Aza Raskin (with his hat) mentioned something similar on his blog: see http://www.azarask.in/blog/post/protecting-email-with-css .
5 days later
[...] http://www.kryogenix.org/days/2008/08/21/readable-non-harvestable-email-addresses-with-css asks Hoosgot, [...]
6 days later