How this blog counts views
Most simple view counters add one every time the page is requested. Refresh five times and you’ve “read” the post five times. Link previews from chat apps, crawlers and prefetching add more. The number goes up, but it says little about how many people read the post.
Count readers, not requests
This blog only counts a view once a small script on the page has seen you actually reading: the tab is visible and you’ve scrolled or moved the mouse for about five seconds. Bots that fetch the HTML never run that script, and someone who opens the post and immediately leaves doesn’t count either.
Ignore the refresh
The second part is deduplication. When a view comes in, the server computes a hash:
sha256(salt | ip address | user agent | post)
and stores it with a unique constraint. The same person reading the same post produces the same hash, so a second insert is ignored. The salt is random and changes every few hours; when it changes, the old one is deleted. After that, nothing links the old hashes to an IP address, not even the database, and the IP itself is never stored.
How long that window is decides what counts as “the same visit”. Try it:
A short window counts someone who comes back later in the day as a new view. A 24-hour window counts each reader once per day, however often they return.
What I can see
Besides views, the script reports how long the page was actually being read, how far down it got, and which section headings came into view. That shows whether people read to the end or stop at some section. None of this is shown publicly.