[thelist] hiding email addresses

Will willthemoor at gmail.com
Tue Oct 14 00:04:56 CDT 2008


> >>> What about a JPG of the email? That's what I have done for some
> >>> sites.
> >>
> >> But the JPG would need an alt attribute to make it accessible....
> >
> > And there's the paradox - if it's accessible enough for screenreaders,
> > it's accessible enough for spambots (let alone spammers paying humans
> > in low-wage economies).
>
> I suppose you could take a tip from captcha -- give your email in a
> jpeg, along with an audio file of you reading it aloud for those who
> can't read the jpeg.


But then you can't click it to send an email. :)

Seems like there are lots of ways to obfuscate an email but you always have
to give something else up.

If you're only dealing with a few email addresses on a static site, you can
do it with javascript with some success. It feels a little dirty but it's an
option. It will be accessible to Jaws but that's the only screen reader I
know of that supports js. Spam harvesters don't have js on (or at least they
didn't last I looked into it - who knows...) I missed the initial thread so
pardon me if this has been suggested.

Put the email in your source js, shuffled. like:
var e1 = "com";
var e2 = "name";
var e3 = "domain";
var e4 = "@";

and concatenate them with js on page load, sticking them into <a>s with a
given class.  Unless spam harvesters have JS on these days, it will be junk
to them.  Perhaps you could include a spamming blacklist organization's
email in there by default.  muhahaha.

I've used it before and it worked well but it fails if the user doesn't have
JS on or if you're trying to use it on a CMS driven site where you don't
know the actual email Joe User is going to put on page x.

Will



More information about the thelist mailing list