看起来我们将为Stack Overflow添加CAPTCHA支持。这对于防止机器人、垃圾邮件发送者和其他恶意脚本活动是必要的。我们只希望人类在这里发布或编辑东西!

我们将使用JavaScript (jQuery)验证码作为第一道防线:

http://docs.jquery.com/Tutorials:Safer_Contact_Forms_Without_CAPTCHAs

这种方法的优点是,对于大多数人来说,CAPTCHA永远不会可见!

然而,对于禁用JavaScript的人,我们仍然需要一个备用方案,这就是棘手的地方。

我为ASP编写了一个传统的CAPTCHA控件。NET,我们可以重复使用。

但是,我更倾向于使用一些文本化的东西,以避免为每个请求在服务器上创建所有这些图像的开销。

我见过这样的事情…

ASCII文本验证码:\/\/(_)\/\/ 数学难题:7减3乘以2等于多少? 小问题:癞蛤蟆和冰棍,哪个更好吃?

也许我只是在风车这里倾斜,但我希望有一个更少的资源密集型,非图像为基础的<noscript>兼容的验证码,如果可能的话。

想法吗?


当前回答

这些JavaScript解决方案是否都适用于屏幕阅读器?而图像减去一个有意义的alt属性可能会破坏WCAG。

其他回答

If the main issue with not using images for the captcha is the CPU load of creating those images, it may be a good idea to figure out a way to create those images when the CPU load is "light" (relatively speaking). There's no reason why the captcha image needs to be generated at the same time that the form is generated. Instead, you could pull from a large cache of captchas, generated the last time server load was "light". You could even reuse the cached captchas (in case there's a weird spike in form submissions) until you regenerate a bunch of new ones the next time the server load is "light".

你试过http://sblam.com/en.html吗? 据我所知,这是验证码的一个很好的替代方案,而且对用户来说是完全透明的。

我认为一个定制的验证码是你最好的选择。这种方法需要一个专门针对机器人/脚本来破解它。这种努力因素应该会减少尝试的次数。人类毕竟是懒惰的

reCAPTCHA大学赞助并帮助图书数字化。

我们生成和检查扭曲的图像,所以你不需要运行昂贵的图像生成程序。

我一直在使用http://stopforumspam.com作为对抗机器人的第一道防线。在我已经实现的网站上,它可以阻止几乎所有的垃圾邮件发送者,而不使用验证码。