What is the secure and effective way to keep visitor's view stat? (cookie only is not enough)
The requirements:
- For each item in the shop, keep stat about visitor's view.
- During the first 15 mins, do not count the same visitor even though that visitor re-open the web browser
- Need a way to protect visitor's cheating (The above 2 requirements should always be apply)
- For example of cheating, If we're using Cookies, this is not good开发者_如何学JAVA enough, WHY? Visitor can disable cookies and press "Refresh" to increase the stat(visitor's view)
Any good solution?
You have only two possibilities:
- Track cookies / flash cookies (which many people don't even know of): That means tracking on the machine of the user
- Track IP addresses: That means tracking the users on your server (you keep a database of IP addresses which have visited your site during the last 15 minutes or so).
Both possibilities can be "cheated". Cookies can be deleted, IP addresses can be changed. There is no absolute bulletproof way to accomplish what you want (Thank God for that!).
OK, you could force your users to login, then you could track everything down to a specific user account - no more cheating (well also not true: what about duplicate accounts...). But without such a limitation... no way.
精彩评论