HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 22nd, 2009, 12:26 PM
old&nojob's Avatar
old&nojob old&nojob is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Location: Lulworth, Dorset
Posts: 178 old&nojob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 11 m 12 sec
Reputation Power: 4
Protect clients email address

I have seen several ideas to do this but the ideas are somewhat old (2006?) and was wondering if there is an up-to-date method of protecting the mailto: address in the HTML. I suspect javascript is no good if the visitor has js turned off in the browser.
__________________
---------------------
Thanks for your time.

Reply With Quote
  #2  
Old June 23rd, 2009, 05:20 AM
scoper's Avatar
scoper scoper is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2004
Location: Surrey, UK
Posts: 961 scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level)scoper User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 1 Week 2 Days 1 h 15 m 20 sec
Reputation Power: 253
Send a message via MSN to scoper Send a message via Google Talk to scoper Send a message via Skype to scoper
If the link needs to be a mailto link, then theres no real way to do it using just HTML unfortunately. You can obfuscate and hard-code the email address, but that isn't going to stop a bot/spider whatever from reading it - obfuscation is only really good for hiding from humans.

Some people have suggested replacing the @ symbol with @ but again, it's just basically trying to trick whoever into thinking that it's not an email address.. however, the thing to remember is that if a href attribute starts with "mailto:" an email address is going to follow - however it's encoded.

One thing you can do, is handle the onclick of the link (using JavaScript) and redirect the page to the mailto there - this way you can concatinate a couple of strings to create the email address. This means that bots are less likely to be able to work out whats going on.

Code:
<script type="text/javascript">
function sendIt() {
    var at = "@";
    var user = "user";
    var domain = "domain";
    var protocol = "mailto";
    window.location.href = protocol + ":" + user + at + domain;
}
</script>


It's not great, but it's a start
__________________
Scott Perham - MCPD

That URL too long? Why not URL IT!

Reply With Quote
  #3  
Old June 23rd, 2009, 07:49 AM
old&nojob's Avatar
old&nojob old&nojob is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Location: Lulworth, Dorset
Posts: 178 old&nojob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 11 m 12 sec
Reputation Power: 4
Thanks, so if I put all that in a js file and do a script statement in the header, what does the footer link change to?

Reply With Quote
  #4  
Old June 24th, 2009, 02:40 AM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 9th Plane (9000 - 9499 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 9,074 jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 16th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 4 Months 3 Days 21 h 8 m 2 sec
Reputation Power: 2030
Send a message via AIM to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
There are various ways, but this works...
Code:
<p><a href="javascript:sendIt()">Mail me</a></p>
__________________
Cheers,

Jamie

# mdb4u | mobile movie database | Currently being revamped
# skiFFie | Jamie Burns [me]
# guidelines | search | wap resources | not getting help | fold to cure

__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.



__________________

Reply With Quote
  #5  
Old June 24th, 2009, 03:17 AM
old&nojob's Avatar
old&nojob old&nojob is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2006
Location: Lulworth, Dorset
Posts: 178 old&nojob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 11 m 12 sec
Reputation Power: 4
Actually, before I try this, I have just tested mailto: link in Safari and Firefox and Safari posts a message saying Vista can't do it and Firefox just ignores the click. But when I use my other machine IE7 creates an email form from my webmail OK. Anyone know what the solution is for this?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Protect clients email address


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
Stay green...Green IT