Graceful E-Mail Obfuscation

by Roel Van Gils

101 Reader Comments

Back to the Article
  1. I wrote an email obfuscation routine at that does what you did, but steps it up a notch.  I wrote a function that base64 encodes the entire mailto link and I put it in the title attribute.  When a user hovers over it with a mouse (yeah, I know, not everyone has javascript – and for this I don’t care), THEN the title is decoded, placed into the href attribute before they click on the link, and when their mouse leaves the anchor area it then becomes obfuscated again.  To step it up a notch, I also rot13 it, but that’s not included in the script I provide.  This solves all of the problems of +‘s, extra periods, even chinese characters.

    Copy & paste the code below to embed this comment.