1

I'm looking to identify each computer that accesses my website independent of cookies.

I know it can be done because Twitter does it. Here's proof:

  1. Reset a browser (no cookies, no cache, total reset)
  2. Visit twitter.com
  3. Note the value of newly added _twitter_sess cookie
  4. Repeat Steps 1 - 3. Cookie _twitter_sess will have the same value as before
  5. Change IP addresses
  6. Repeat Steps 1 - 3. Cookie _twitter_sess will have the same value as before
  7. Change Browsers
  8. Repeat Steps 1 - 3. Cookie _twitter_sess will have the same value as before
  9. Change User Agents
  10. Repeat Steps 1 - 3. Cookie _twitter_sess will have the same value as before
  11. Change Computers
  12. Repeat Steps 1 - 3. Cookie _twitter_sess will finally be different

How can I do the same? I'd like to track individual computers that visit my site independent of them clearing cookies, or expiring cookies.

Ryan
  • 14,682
  • 32
  • 106
  • 179

1 Answers1

0

Sounds like Twitter checks IP addresses from the browser request headers, so you would need to implement something similar on the server side when your request comes in. For example, in Java:

How can I retrieve IP address from HTTP header in Java

Edit: A solution that doesn't rely on IP addressed in more detail here:

How do I uniquely identify computers visiting my web site?

Community
  • 1
  • 1
Joe PP
  • 71
  • 2
  • 12
  • _twitter_sess cookie value persists even on a new ip. – Ryan Jan 21 '14 at 16:10
  • How are you changing your IP address at Stage 5? – Joe PP Jan 21 '14 at 16:11
  • I have five IPs at my office to choose from. I just accessed another network and repeated steps 1-3. – Ryan Jan 21 '14 at 16:12
  • So you actually want it to be able to tell when it's the same machine but on a different IP, as it appears that Twitter does? So you can count that as the same user? – Joe PP Jan 21 '14 at 16:23
  • May or not may not be helpful, but there has been some discussion on this before including discussion of flash cookies: http://stackoverflow.com/questions/216542/how-do-i-uniquely-identify-computers-visiting-my-web-site?rq=1 – Joe PP Jan 21 '14 at 16:58
  • Yes, I've been running this on Safari without Flash installed. So it's not Local Storage either. – Ryan Jan 22 '14 at 16:22