For example, if you refresh the page 2 times that means 2 views? What I'm asking is whether the view count reflects reality or if it is inaccurately increased (like for example Beast Lair)
-
2How are the number of views in a question calculated?– Dimitri mx ModNov 4, 2016 at 10:35
-
Thank you XD. I delete the question I guess?– LordNov 4, 2016 at 10:37
-
No need, if somebody else would become curious enough, they can stumble upon it, and don't have to ask a new question for it ;)– Dimitri mx ModNov 4, 2016 at 10:39
-
The very last comment says unique per IP per 15 minute interval. So after 15 minutes refreshing works?– LordNov 4, 2016 at 10:48
-
I'm gonna rephrase it. I've been watching one question once a day for the last 9 days and the count view increased exactly by 9. Was it me?– LordNov 4, 2016 at 10:51
-
very likely yes– Dimitri mx ModNov 4, 2016 at 10:52
-
Well, I guess then it does inflate numbers a bit but it's mostly accurate.– LordNov 4, 2016 at 10:56
1 Answer
There is a question over at meta.SE which goes into a lot of details. But here’s the gist of it:
Every question page has a counter link embedded:
http://stackoverflow.com/posts/3590653/ivc/[Random code]
There is a throttle mechanism in action to prevent hitting F5 transforming into an inflated view count:
- for anonymous users,
IP + question number
is saved - for registered users,
user number + question number?
is saved.
Each of those as a pair and in an expiring cache entry which will expire after some fifteen minutes. If the cache entry still exists, refreshing the page will not generate a new hit. Otherwise it will.
- for anonymous users,
Source for all of this is the accepted answer to the question linked above.