1

我在网页上放置了一个表单,用户可以在其中向我们发送数据。不幸的是,网站管理员确实通过此表单收到了大量垃圾邮件,并且有效提交的内容被掩埋了。

我已经使用验证码绕过了这个问题。但我认为每个人都会同意验证码对用户来说是一个很大的烦恼。

我切换到另一个解决方案:现在提交表单的 URL 指向 null:

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

我使用 jQuery 优秀的表单插件绕过表单提交:

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

从那时起,没有垃圾邮件到达网站管理员,并且有效的评论通过了。唯一的缺点是没有 javascript 的用户无法向我们发送表单。但由于这是在 javascript Web 应用程序之上,我们可以安全地假设这些用户不是有效用户。

我的问题是:在一个 99% 的用户启用了 javascript(并且可以为这些用户构建使用验证码的机制)的世界中,为什么这个解决方案不被更多地使用?我没有看到什么缺点?

4

3 回答 3

2

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.

于 2010-05-20T17:36:28.320 回答
0

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

于 2010-05-20T17:31:50.577 回答
0

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.

于 2010-05-20T17:35:18.083 回答