Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to identify a visitor based on their browser characteristics?

Tags:

javascript

I'm making a simple application where users can rate items.

I want to make the application very easy to use and would like to avoid a login, even if it means less accurate ratings.

I found this article on recognizing a user based on browser characteristics: http://www.mediapost.com/publications/?fa=Articles.showArticle&art_aid=128563

How can I implement something like that in JS/Node.js?

like image 967
edt Avatar asked May 19 '11 15:05

edt


1 Answers

Rather than doing a lot of trickery based on browser characteristics which may or may not be available, you could just use a cookie. Browsers may change/upgrade over time. You won't be able to avoid a browser change causing a new user in either case. But, a cookie will be maintained over browser upgrades. Just set the cookie to some (semi)unique value (such as time including milliseconds + IP address) and you'll be all set. At the point that you have so many users that the (semi)unique values have issues, you'll be rearchitecting your site anyway (and probably have a team of people working for you).

like image 111
evan Avatar answered Nov 07 '22 05:11

evan