« Return to Thread: How to introduce delay for some requests?

Re: How to introduce delay for some requests?

by Toni Lamar :: Rate this Message:

Reply to Author | View in Thread

lhazlewood wrote:
What do you want to take "too long"?  The loading of the feedback form
page?  Or the submission of the page?
I don't know. I suppose the last part.
I saw this strategy used by some PHP + Apache sites to reduce the number of spam bots.
Since it's not possible to know 100% if a request comes from a bot, resetting the connection is not an option. Delays seem to discourrage mass spamming, but detecting the bot should deliver as few false positives as possible.

lhazlewood wrote:
Can't you use Thread.sleep to do this?  
I believed that using Tread.sleep in Servlets (Click servlet in this case) is not reccomanded because
unknown side effects - it's not always only one thread - sometimes are pooled, sometimes are more, if commet is used than on thread is delivering to more requests, etc.

lhazlewood wrote:
I'm not sure what the exactly
requirements are or where the delay should occur, or that it is a good idea
to begin with ;)
As usual, there are no "exact requirements" :):
Just to have less spam to interfere with public forms(mostly feedback like) from customers :).

Thnx.

 « Return to Thread: How to introduce delay for some requests?

LightInTheBox - Buy quality products at wholesale price!