Using jQuery with form to eliminate spam

Posted by Thierry-Dimitri Roy on Stack Overflow See other posts from Stack Overflow or by Thierry-Dimitri Roy
Published on 2010-05-20T17:29:06Z Indexed on 2010/05/20 17:40 UTC
Read the original article Hit count: 185

Filed under:
|
|
|

I have put a form on a web page where the user can send us data. Unfortunately, the webmaster does get a lot of spam through this form and the valid submissions gets buried.

I have used captcha to bypass this problem. But I think that everyone would agree that captcha is a big annoyance to users.

I switched to another solution: now the URL of the submit form points to null:

<form id="sendDataForm" action="/null" method="post">
...
</form>

And I bypass the form submission using jQuery excellent form plugin:

$('#sendDataForm').ajaxForm({
        url:        '/ajax-data/'
    });

Since then, no spam has reached the webmaster, and valid comments gets through. The only drawbacks is that users without javascript cannot send us the form. But since this is on top of a javascript web application, we can safely assume that these are not valid users.

My question is: in a world where 99% of users has javascript enabled (and a mechanism for those user could be build that uses captcha), why is this solution not more used? What drawback am I not seeing?

© Stack Overflow or respective owner

Related posts about spam

Related posts about AJAX