Polls are everywhere, take out E2. We just love to vote, don't we.. To believe that we have the power to influence, feel better with ourselves if we pick that one option most people did. But have you ever wondered how the poll knows you have voted -- how is it, that on this 'anonymous' Internet does it recognize you as someone who has aslready cast a vote?

Well, as most will guess, there are two ways of doing this:
1. setting you up with a cookie.
2. remembering your IP.

Usually, both will do the trick, but which one to pick? There are advantages and disadvantages to both.

Using Cookies
This is done by placing a cookie into the browser, and thus remembering you. At this point, you can pick one of two methods:

  1. placing a unique id number into the cookie and creating a matching entry in a database, noting that the person with that id has already voted.
  2. setting the cookie which contains the voting information.

Either way you go, there are numerous problems with cookies. A user can set his browser to ignore cookies, or he simply locate the cookie on his hard drive and remove it manually. One major advantage with cookies, is that your database has less information to hold.

Logging the IP
At first, this seem as a much better way to go, but it also has disadvantages. First, you have to understand that most people are using dialup connections to the Internet, which means they receive a different IP every time they connect. So after voting, you can not only vote the next time you log in, but someone else, who will receive your IP after you disconnected, will be prevented from voting. Also, keep in mind that many people are using firewalls and proxy servers, these people are sitting in a closed network and ask a secure server to pass them the information. That one server has one IP, so once a person on that closed network votes, the others are immediately blocked from doing the same.

So which is the better way?
Most programmers will decide what's important to them - more votes or security. Some will use both methods and create a somewhat better solution. Most programmers though, will not attempt to solve this problem, because frankly, it cannot be solved.

This is why Slashdot notes that "If you're using these numbers to do anything important - you're insane."

Log in or register to write something here or to contact authors.