views:

37

answers:

3

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?

A: 

I don't even use the form tag in javascript apps.

resopollution
A: 

We obfuscated email addresses that we have to post online with JavaScript. It's a good trick, but only cause most spam bots ignore JavaScript. It's not a guarantee to protect anything, just a tool to make it harder for email address harvesters to get information.

ICodeForCoffee
+1  A: 

It is ultimately a game of whack a mole. The reason it works is because it is not more used, if it were the spam bots would be updates to work around it. Ultimately you are just making an http request and that can be automated.

Ben Robinson