For example, when you visit somebody's profile, (s)he is shown as "seen" for 1 hour. Now, if (s)he has activity again on the site, even if you come back to his profile, the status is not updated. So, say, he is shown as seen for 1,2 hours etc. even if he visited more recently. And at some point, maybe after one day, that is reset. Does this really happen (for privacy reasons)?
-
The status is updated when you revisit the site. However, if you are not logged in, the status won't be updated. The particular Stack Exchange site must recognize you as logged in before the status gets updated with a new time.– J.R. ModAug 11, 2013 at 18:39
-
@J.R. I think what he means is, right now I've just opened my computer and my profile says "seen 1 minute ago". Well obviously I'm still online right now--but the update is from the moment I logged in. So if I were on the site for 10 consecutive hours, it still might say "seen 10 hours ago" (even while I'm still online). Honestly I'm not sure under what conditions that timer is reset. Obviously a constant "seen 0 seconds ago" while you're online would be a bit strange ;)– WendiKiddAug 11, 2013 at 19:00
-
Yes @WendiKidd that's closer to what I mean and also, I am interested when I visit somebody else's status, not mine– Bogdan LataianuAug 11, 2013 at 19:02
-
1@Theta30 Oh, I know. Presumably you know when you're online ;) I just used myself as an example because I'd just logged in, so I thought the point was a bit clearer. (Plus my own profile is the most convenient to click on ;))– WendiKiddAug 11, 2013 at 19:03
-
@WendiKidd: Oh, I see what the question is now. (I usually log in and log out really quickly, so I can't remember my profile saying anything much more than a few minutes.)– J.R. ModAug 11, 2013 at 21:10
1 Answer
As far as I know, the answer is caching. That's done for technical reasons (performance); as far as I know there is no particular feature there that is meant for privacy.
When you view a profile page, the server has to gather data from various parts of the database. Gathering that data takes time. So the front-end server keeps recent data in its own memory. That use of memory is called a cache. Depending on how quickly the real data tends to change, on how costly it is to retrieve the updated data, and on how busy the system is, the value might stay in the cache for a anything from a few seconds up to a few hours.
It's possible for the information in a page to be from different moments in time. That depends on where exactly the caching happens. For example, when you're viewing a question, scores are updated instantly (they even refresh live in your browser), because they're easy to get at and useful to know. On the other hands, the number of views is cached heavily, because an approximation is good enough, and the number is hard to retrieve in real time. (This is why sometimes you'll see a question with 2 views and 3 upvotes: the view counter is actually a cached value that's a few minutes old.)