On my homepage, I'm using this method to hide my email from spam bots:
<a href="admin [at] example.com"
rel="nofollow"
onclick="this.href='mailto:' + 'admin' + '@' + 'example.com'">Contact me</a>
What do you think about it? Is it effective? What other methods do you know or use?
I don't like JavaScript and HTML to be mixed, that's why I use this solution. It works fine for me, for now.
Idea: you could make it more complicated by providing encrypted information in the
data
-attributes and decrypt it within the JS. This is simply done by replacing letters or just reversing them.HTML:
JS:
Try it: http://jsfiddle.net/x6g9L817/
Here is my working version:
Create somewhere a container with a fallback text:
And add at the bottom of the DOM (w.r.t. the rendering) the following snippet:
It adds the generated hyperlink to the specified container:
In addition here is a minified version:
There are probably bots that recognize the
[at]
and other disguises as@
symbol. So this is not a really effective method.Sure you could use some encodings like URL encode or HTML character references (or both):
But as it is legal to use them, every browser/e-mail client should handle these encodings too.
I like ofaurax's answer best but I would modify to this for a little more hidden email:
Have a look at this way, pretty clever and using css.
CSS
HTML
The CSS above will then override the reading direction and present the text to the user in the correct order.
Hope it helps
Cheers
And my function. I've created it looking at answers placed in this topic.
It uses two methods: right to left dir and javascript putting.