如何让CAPTCHA跨多个页面工作?

时间:2021-06-27 22:58:49

Ever visit a website such as myspace where they leverage CAPTCHA to prevent spam? The typical pattern is to present a challenge to each URL that is opened, yet the challenge doesn't actually belong to the page itself which causes additional bandwidth usage.

有没有访问像myspace这样的网站,他们利用CAPTCHA来防止垃圾邮件?典型模式是对打开的每个URL提出质询,但挑战实际上并​​不属于页面本身,这会导致额外的带宽使用。

So, if I open up six pages at the same time and want to present a challenge on each page. I want the challenge to be tied to the page and not to the session. How can I make this work with Spring and/or Struts.

因此,如果我同时打开六个页面并希望在每个页面上提出挑战。我希望将挑战与页面绑定,而不是与会话绑定。如何使用Spring和/或Struts来完成这项工作。

1 个解决方案

#1


0  

This depends largely on what you are using for rendering the pages. Spring MVC? Struts? You can tie components to pages in most of these frameworks.

这在很大程度上取决于您用于渲染页面的内容。 Spring MVC? Struts的?您可以在大多数框架中将组件绑定到页面。

You can also maybe think of a workaround where each page registers his captcha in the session in a seperate key, and have the page check against it's own value.

您也可以考虑一种解决方法,其中每个页面在单独的密钥中在会话中注册其验证码,并使页面检查它自己的值。

#1


0  

This depends largely on what you are using for rendering the pages. Spring MVC? Struts? You can tie components to pages in most of these frameworks.

这在很大程度上取决于您用于渲染页面的内容。 Spring MVC? Struts的?您可以在大多数框架中将组件绑定到页面。

You can also maybe think of a workaround where each page registers his captcha in the session in a seperate key, and have the page check against it's own value.

您也可以考虑一种解决方法,其中每个页面在单独的密钥中在会话中注册其验证码,并使页面检查它自己的值。