Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I was just searching for a review on Yelp and I saw these (Useful, Funny, Cool) evaluation tags for a review. I was able to mark them even when I was not logged in, still they would retain the way I marked them even if I open a new browser window, or a private browsing session.

How is this done? I mean how does it track user activity without requiring me to login/signup? I don't know if its cookies or the site stores my IP address or a combination of both?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Storing this in cookies/session is the way to go. In PHP you can just use the $_SESSION functionality to do this. More info on that here.

This will not work if the user opens a private browsing session, though. IP tracking would work, but IP addresses change due to ISP assignments and may represent different users (for example, two users in one home sharing the same DSL connection). For these reasons this is not recommended.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.