|
|
![]() |
#1 | |
Member
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
|
![]() Quote:
When I use an email address I usually obfuscate with a small PHP routine - dynamically; but actually by now I favor using a form (which doesn't reveal an email address in the first place); and it can be further protected against spammers in various ways. (Yes, I know: not on my sites - yet - I want to make a generic piece of code for that, but coding is a ways off while I'm still struggling bringing Christiaan around again.) __________________ Marjolein Katsma ![]() Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog |
|
![]() |
![]() |
![]() |
#2 | |
Founding Sysop
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,187
|
![]() Quote:
It is interesting that most agree that only the JavaScript solution is fool-proof. And I have read that most web users do have JS enabled (Someone on the U.C. California/Berkeley site said that 94% do use it; of course, Berkeley users are not what I would call a typical population, much as I enjoy their company!) I have also found an essay that suggests that it is up to users to defend against spam, not site creators. Hmmm. Anyway, right now I am considering a solution that uses ‘on mouseover’ to trick spiders from reading e-mail addresses. I will post it below — do you know anything against that: ------------------------------- Replace me, example.com, and Link text with whatever’s appropriate: <a href="mail.html" onmouseover="this.href='mai' + 'lto:' + 'me' + '@' + 'example.com'">Link text</a>Or, to have your link text display something that looks like your e-mail address, then you could do something like this: <a href="mail.html" onmouseover="this.href='mai' + 'lto:' + 'me' + '@' + 'example.com'">me[at]example.com</a>which will display as: me[at]example.com--------------------------------- __________________ [SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE] [SIGPIC][/SIGPIC] |
|
![]() |
![]() |
![]() |
#3 | ||||
Member
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
|
![]() Quote:
Quote:
Quote:
Quote:
__________________ Marjolein Katsma ![]() Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog |
||||
![]() |
![]() |
![]() |
#4 | |||
Founding Sysop
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,187
|
![]() Quote:
Quote:
Quote:
:: __________________ [SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE] [SIGPIC][/SIGPIC] |
|||
![]() |
![]() |
![]() |
#5 | ||
Member
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
|
![]() Quote:
There's nothing wrong with using JavaScript; you just shouldn't use it for essential functionality. Unless, maybe, the site is actually about JavaScript - which this one isn't. And blind people book vacations, too - even if it's their partner who drives. Quote:
If you do want to do it by hand I can teach you how - as long as you have an ASCII table or another thingy that can tell you the ASCII decimal and/or hexadecimal value of a character. __________________ Marjolein Katsma ![]() Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog |
||
![]() |
![]() |
![]() |
#6 | |
Founding Sysop
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,187
|
![]() Quote:
Don’t spambots de-code that? Sounds too easy. Can you mix hex and decimal, or does it matter? __________________ [SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE] [SIGPIC][/SIGPIC] |
|
![]() |
![]() |
![]() |
#7 | |
Member
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
|
![]() Quote:
Three methods The idea is to "treat" each character in the email address in one of three ways:
![]() The obfuscation algorithm Got all your tools together? Here goes:
Notes and refinements
No link description? If you can't (or don't want to) use a link description in the form of a (role) name but want to use the actual email address, you must strike a balance between "weaker" encoding and some possible extra work for your site's visitors.
Exercises Write out the example email address 'john_doe@example.com', and post it here. Want more practice? Create a "textual obfuscation" for a link description and post that as well. Have fun confusing the spambots! ![]() __________________ Marjolein Katsma ![]() Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog |
|
![]() |
![]() |
![]() |
#8 | |
Founding Sysop
Join Date: Oct 2004
Location: In Connecticut, on the Housatonic River near its mouth at Long Island Sound.
Posts: 11,187
|
![]() Quote:
But darned if I can show it here, not even without the a href, not even with square brackets instead of angled. Or even on a web page (if I ask Firefox to show me its properties, it reveals the ordinary straight address — shouldn’t it be showing me my underlying code?) Doesn’t that mean that the spiders have access to the plain name in the end anyway? Anyway, I have attached a very wide image to show what I did. :: __________________ [SIZE=2][COLOR=LemonChiffon]::[/COLOR][/SIZE] [SIGPIC][/SIGPIC] |
|
![]() |
![]() |
![]() |
#9 | ||
Member
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
|
![]() Quote:
You could try either of two things (or both):
Quote:
![]() Code:
<a href="mailto:john_doe@example.com">John Doe</a> __________________ Marjolein Katsma ![]() Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog |
||
![]() |
![]() |
![]() |
#10 |
Member
Join Date: Oct 2005
Location: Amsterdam, NL
Posts: 4,894
|
![]()
The forum software is a little bit too helpful here, but the code actually is there: look at the page source! I had to do it without preview though - otherwise the code would be translated back to normal text in the form textarea as well...
(Normally this would be what you'd want to happen, so you can type an entity and end up with the actual character, for instance for entering Unicode characters - but that it's doing it inside a [*code] or [*html] tag is less helpful. The fact that (without looking at the page's source code) you see "plain text" email instead of code means two things: The browser renders the "HTML encoded" string just fine; and sice it's "readable" the code was actually correct. Remember, the browser cannot render URL-encoded characters - had you used those, they should remain untouched. And... given that an entity is rendered, you could of course "escape" it: Code:
o <-> &#111; __________________ Marjolein Katsma ![]() Occasionally I am also connecting online dots... and sometimes you can follow me on Marjolein's Travel Blog |
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Underscore in Email Addresses | dthomsen8 | Web Site Building & Maintenance | 7 | 02-19-2010 02:46 AM |
osx mail help | helene silverman | General Publishing Topics | 6 | 08-18-2005 11:46 AM |