Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Viewed count for any post functionality need to change

 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have been observed that if I refresh the post the count of viewed shown below at the end of every post also been increased. I guess the functionality should count only the counts and increase if the users viewed that post first time. There must be having some logic which check IP and increase count.

 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11877
195
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Likes 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally I dislike it when people tell me what needs to happen, especially when they say that it "must be".

As to the overall functionality - we can't just use IP addresses, as many places (e.g. schools, businesses, libraries, ...) use a single IP address, so restricting on that criteria would simply change the problem from one where a topic might have a too high number to one where a topic might have too low a number. In addition, this implies storing data on the server side on what pages every visitor (signed in or not) has viewed for all time - the potential database table would be huge. There are worse problems to consider if you try to save that information client side.

I'm don't see this as a high priority, especially given the complexity involved in getting accurate counts and the relatively low value in trying to get them accurate. It is not like there is any competition to see which topics are viewed the most.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34378
346
Eclipse IDE Java VI Editor
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also don't think it is currently wrong. It says # page views, not # distinct people who read it. If I click on this thread every day for 5 days to see new posts, that's 5 views. Not 1 view.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic