[Fixed]-Poll app, avoid multiple votes from same person

1👍

Depends on how far you want to take it:

  • Submit the votes through ajax using POST method so there is no url to access directly from a browser
  • Add cookies for those who voted
  • Add captcha
  • Store IPs (here are some suggestions on how to store them efficiently, can also utilize something like Redis if performance is critical, but unless you are building a national voting system you probably would be just fine with a regular table)
  • Require registration to vote (registration with email confirmation, registration with facebook account, registration with sms confirmation, and so on)

Also whenever you detected a user has already voted, it could be a smart move to just silently ignore their further votes and pretend that they were accepted, this way they won’t try nearly as hard to cheat.

👤serg

Leave a comment