Jump to content

Ajax Querying my Database preventing spam, without a go button


cooldude832

Recommended Posts

I have a page with some categories and a calendar.

 

I want users to be able to update what content is collected without a go button, but I can image querying the database every time a day is toggled is going to lead to DOS errors really quickly.

 

If I put a delay in it users might start to click a million times causing more problems.

 

The content being displayed is some event display boxes, a styled with a 75x75 image in it.

 

Any ideas here how to do this.  I can see it working when the data set is reduced by tracking what is displayed in a JS array and just knocking out items that are no long included.

 

Link to comment
Share on other sites

Hrmmm, you can take steps to reduce the frequency of requests, but when it comes down to it having a crap load of requests is essentially in the design of something like that.

 

 

You could try to limit it to 2 request a second or something though.  Also, could make it so that it wouldn't query the DB until the field had stayed the same for a second or something.  (That way everytime the user hits a key a request isn't sent.)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.