SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Edinburgh, Scotland
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Anti-spam email links in Javascript

    I have been asked to produce a public-facing page containing email links. The user wants to avoid spam, but also wants to have AAA accessibility, which appears to be mutually exclusive. The page is produced by JSP, so I can write whatever HTML / Javascript I like, but I can't see how to get around the problem that a browser which does not have Javascript enabled will not be able to display the email address.
    Is it acceptable to use a <no-script> tag to say something like: "email address obscured due to spam" ?
    This would seem to me to go against the general principle of providing alternate versions of non-accessible content.

    Mike

  2. #2
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    No, that is not an option if you want AAA if you are providing a clickable mailto use a server-side solution, for example allow them to click a button so then the link will appear.

    A client-side JavaScript only option is a dead duck unless the noscript contains the actual link, also in that case the spambot would then grab the address from <noscript>.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    Edinburgh, Scotland
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by xhtmlcoder
    No, that is not an option if you want AAA if you are providing a clickable mailto use a server-side solution, for example allow them to click a button so then the link will appear.
    Sorry, but I don't understand what you are getting at. If I am restricted to server-side code then I have to have some other (Pop-up? ) page with the email address in it. To reach that page I would need an accessible link, which means a spam-bot accessible link, so no advantage gained, unless you know of a way to hide pages from spam-bots.

    Quote Originally Posted by xhtmlcoder
    A client-side JavaScript only option is a dead duck unless the noscript contains the actual link, also in that case the spambot would then grab the address from <noscript>.
    Exactly what I was trying to explain.

  4. #4
    SitePoint Wizard silver trophy KLB's Avatar
    Join Date
    Nov 2003
    Location
    Maine USA
    Posts
    3,781
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JavaScript is really out of the question if you want to be AAA compliant (although personally I think all web browsers should have some basic level of JavaScript support). The only way one could really protect email links from spam bots and be AAA is to use a contact form that is processed by the server in such a way that the email address is NEVER exposed to the webbrowser. If a user using a web browser can access the email address without using JavaScript, so can any spam bot.
    Ken Barbalace: EnvironmentalChemistry.com (Blog, Careers)
    InternetSAR.org
    Volunteers Assist Search and Rescue via Internet
    My Firefox Theme: Classic Compact
    Based onFirefox's default theme but uses much less window space

  5. #5
    gingham dress, army boots... silver trophy redux's Avatar
    Join Date
    Apr 2002
    Location
    Salford / Manchester / UK
    Posts
    4,838
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by omnicity
    Sorry, but I don't understand what you are getting at. If I am restricted to server-side code then I have to have some other (Pop-up? ) page with the email address in it. To reach that page I would need an accessible link, which means a spam-bot accessible link, so no advantage gained, unless you know of a way to hide pages from spam-bots.
    he meant: use a contact form that then sends the email from the server, not a clickable mailto link...
    re·dux (adj.): brought back; returned. used postpositively
    [latin : re-, re- + dux, leader; see duke.]
    WaSP Accessibility Task Force Member
    splintered.co.uk | photographia.co.uk | redux.deviantart.com

  6. #6
    SitePoint Member planetx's Avatar
    Join Date
    Mar 2004
    Location
    Mississauga, Canada
    Posts
    21
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've seen a web site that put the mailto address in HEX. The browser displayed it correctly. I am assuming that this web site did so to avoid spam - some spam crawlers may not have implemented this functionality. Not sure how effective this is nor how accessible it is either?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •