Youtube Video View Count
If you notice, the Number of Views of an Youtube video doesn't change if you refresh the video page multiple times.
Also if you open up the same url on a different brows开发者_JS百科er from same computer it still shows old count.
Any guess what can be their logic of maintaining this view count?
Do they have 2 count fields and they sync up nightly and page always show the synced value not the count that gets updated with page refresh?
Thanks
I think they record all page views which increments the counter, but the output (the HTML you receive) is cached - or at least that portion of it is.
It makes sense - Youtube is a very popular website serving many concurrent people. Performance is very important.
It does make sense not to increase the view count if you keep refreshing the page in your browser, or even opening the page in another browser on the same computer. This can be done by recording the IP of your computer and storing it for a given time interval: the view count will increase only once in that interval. So from a given computer(identified by IP, maybe) the view count of a clip will only increase once per hour/day/etc...
精彩评论