1

I am in the early stages of coming up with a web application that asks the user to vote on something and then see the results on a map. There will be well over 100 options to choose from (suburbs).

I understand how I could make use of cookies to come up with some code along the lines of:

If not unique visitor Then dont show them Voting Screen, take them straight to map showing results.

However, this is still subject to manipulation by anyone who understands that deleting their cookies will give them a new vote.

My application does have a backend SQL Server, so I was thinking that perhaps i could persist their IP address, but then cross comparing this on every initialise from a visitor sounds like it might cause delays.

The application will be public domain and I want to avoid any sort of login to the application, so that I can gather as many votes as possible.

What techniques or plugins might be able to assist me in preventing a user from keep voting for a particular answer multiple times?

jakc
  • 1,161
  • 3
  • 15
  • 42
  • 3
    Unless you have registered users I don't think you can do this reliably... – elclanrs May 07 '13 at 09:36
  • 1
    You can have a blend of using cookie and store it in the SQL server. First check if the cookie is present, then use that to decide if they can vote. If no cookie is present, check your database records and set the cookie based on the results. But keep in mind, as elclanrs says, it's not too reliable. Eg. the IP is usually dynamic for normal users, and there may be many machines/people behind one IP, which would then make others unable to vote on same IP. – thebreiflabb May 07 '13 at 09:37
  • 1
    Please check [link](http://stackoverflow.com/questions/3940179/detecting-a-unique-anonymous-user) –  May 07 '13 at 09:39
  • 1
    Go with Facebook login – David Fregoli May 07 '13 at 09:39
  • @Slytael good link, thanks. Any jQuery plugins based on this? – jakc May 07 '13 at 09:44
  • Possible duplicates: [Online Voting Application. How to avoid repeated voting from same user](http://stackoverflow.com/questions/10724007/online-voting-application-how-to-avoid-repeated-voting-from-same-user/) and [Unique IPs in a voting system](http://stackoverflow.com/questions/7775968/unique-ips-in-a-voting-system) – apsillers May 07 '13 at 13:24

2 Answers2

3

You already have only three options:

  • Cookies (fast but can delete and every browser have own cookies)

  • Static IP Address (heavy connection to database)

  • User Authentication

I will use cookies

Tiago Sippert
  • 1,324
  • 7
  • 24
  • 33
Ahmed Alnahas
  • 263
  • 1
  • 4
0

User authentication is the only reliable method- cookies can be denied by the browser, and static IP's can be shared between many computers (universities or corporate networks etc- every PC will appear from the internet to have the same IP. Home users often have dynamic IP's, so simply need to disconnect from the internet, then reconnect to get a new IP- so this again isn't reliable.

Shawson
  • 1,858
  • 2
  • 24
  • 38