Author |
Topic |
hkexpats
Starting Member
10 Posts |
Posted - 20 September 2005 : 02:03:13
|
Can anyone tell me what the logic used in this it - specifically on the active topics page. If you visit this page and then visit again (say) 5 minutes later then the same topics are shown i.e. your 'last visit' appears to be the same as it was on the first visit.
If however you re-visit (say) an hour later then the topics have gone.
Anyone know the logic i.e. when is a visit deemed to have been completed ? |
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 20 September 2005 : 02:23:11
|
Your session expires 20 minutes (by default) after you leave the site or after your last click on the site.
You can click the "Mark All Topics As Read" button on the active topics page. This will reset your last visit date to the present.
A website doesn't know when you leave the site. Your browser doesn't send a message to the site saying "goodbye" when you close your browser. It doesn't send the message "goodbye" when you visit another site.
So the site assumes you no longer are on it after 20 minutes of no activity. |
Support Snitz Forums
|
|
|
hkexpats
Starting Member
10 Posts |
Posted - 20 September 2005 : 02:45:09
|
OK Thanks - So i assume everytime you visit a snitz forum it looks to see if it has been more than 20 minutes since your last visit (via a cookie I presume) and if so it resets the 'Last Visit' column in the member's record to the last visit date (i.e. the one more than 20 minutes ago). |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 20 September 2005 : 03:35:09
|
Ahh, not exactly. Your last visit date/time is stored in a Session. A session by default expires after 20 minutes. This default time is set on the server. When you visit the forum, it checks the date/time in the session variable to see when you last visited. If the session variable is empty, it reads the last visit date/time from the database. |
Support Snitz Forums
|
|
|
pdrg
Support Moderator
United Kingdom
2897 Posts |
Posted - 20 September 2005 : 03:48:34
|
HKExpats, you may enjoy reading up a bit of background on how HTTP & web servers work - it's all painfully simple really, and can be a great insight into why the web is as it is :) |
|
|
hkexpats
Starting Member
10 Posts |
Posted - 20 September 2005 : 03:52:00
|
OK think I get it. Final question - so when does it update the last visit field in the DB ?
pdrg - thanks. I do feel as though i'm exposing my complete ignorance here... |
Edited by - hkexpats on 20 September 2005 03:52:27 |
|
|
Roger Fredriksson
Average Member
Sweden
556 Posts |
Posted - 20 September 2005 : 04:19:18
|
hkexpats, I know many people much more ignorant in this field then you seem to be, I am one of them. The advantage with beeing ignorant is that you get help from Snitzers beeing less ignorant almost every day and you/I feel a little bit happy knowing that. So, thank you for asking (and Davio for answering of course!) ;) |
rf/www.avgifter.com |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 20 September 2005 : 04:24:07
|
The last visit field is updated at different times:
- when you log into the forum - when you log out of the forum - when you click the "Mark All Topics As Read" button on the active.asp page - when you return to the forum after your session has expired |
Support Snitz Forums
|
|
|
hkexpats
Starting Member
10 Posts |
Posted - 20 September 2005 : 04:37:06
|
OK so just to bring everything together (and to make sure i've got it)...
i) Lets say I visited the forum at 2pm - so my last visit field in the DB is set to that ii) Whilst I'm away 5 threads are updated iii) At 4 pm I return to the forum. The script will try to read the 'LastVisit' value from the session variable and will find that it is empty (i.e. expired) - Therefore it reads the last visit value from the database ( i.e. 2pm) and sets the 'LastVisit' value in the session variable to this. It then updates the 'Last Visit' Field in the Database with 4pm. iv) So for the remainder of that session it will always use a last visit value of 2pm because it will find it in the session variable. v) It will only use a last visit value of 4pm when I next return at (say) 6pm.
|
Edited by - hkexpats on 20 September 2005 04:38:33 |
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
|
Shaggy
Support Moderator
Ireland
6780 Posts |
Posted - 20 September 2005 : 05:23:28
|
Although, the one you forgot is if you mark all active topics as read at 4pm, your session variable will be updated to 4pm.
|
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
|
|
hkexpats
Starting Member
10 Posts |
Posted - 20 September 2005 : 05:27:51
|
Yep got that bit as well - thanks |
|
|
Shpalman
Starting Member
Italy
5 Posts |
Posted - 31 October 2005 : 05:53:57
|
My problem is that in my forum only few members have the "last visit field" updated. Most of my members have the "last visit" date coinciding with the "member since" date even if the post messages regularly!
Is this a sort of cookies problem? Can anyone give me a resolution? Thank you!
Ciao ciao. |
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 31 October 2005 : 09:59:36
|
If they don't log in at all, it doesn't know to update thier profile. So if they are just browsing to the page (not logged in) they are treated like any other user. |
|
|
Shpalman
Starting Member
Italy
5 Posts |
Posted - 31 October 2005 : 11:27:05
|
The strange thing is that all them are logged! In fact my forum has an allowed member list, so they must log in order to browse the pages.
Well, to say the truth, my problem isn't very important, but I should be very curious to known why it happens.
Ciao ciao.
|
|
|
AnonJr
Moderator
United States
5768 Posts |
Posted - 31 October 2005 : 11:46:28
|
Given that this is a bit of a different issue than what was discussed previously, I'd start a new thread. If you haven't done any MODs, and they have to log in to view the forum, something would appear to be amiss... unless my understanding of the situation is off. |
|
|
Topic |
|