How “View Count” is best implemented?

前端 未结 6 523
梦谈多话
梦谈多话 2021-01-30 18:07

On any website, such as on StackOverflow, each question has a view count, and user reading a question but has previous read it won\'t count twice.

I have some ideas abou

6条回答
  •  长情又很酷
    2021-01-30 18:51

    It looks like stackoverflow does not count guest (unlogged) users viewing a topic. The issue with counting anonymous user views is that your counter can be gamed. Someone can always delete the cookie and view again. Logging the views is the safest solution for accuracy, but of course you have two major problems: size of the table and lack of guest/anonymous users. It surprises me that stackoverflow is not logging guest (unlogged) users. I would think that the majority of views would come from these users doing google searches.

提交回复
热议问题