Author Topic: Stay logged on doesn't + refreshing stops  (Read 18589 times)

Offline Chatter

  • Newbie
  • *
  • Posts: 27
Stay logged on doesn't + refreshing stops
« on: May 28, 2018, 09:05:34 AM »
Two things:

I log on, and at some point, it seems to lose the login.  I'm not sure of whether it happens:
- after a certain amount of time, or
- if I don't have the tab active, or
- the comupter has been sleeping and I wake it up, or
- if I'm not running the browser for a while, or
- something else.
My expectation is that it should keep me logged in until (a ) I log out or (b ) blow away cookies.

Also, one of our users wrote: "it is frustrating that this chat service times out where postings won't auto refresh. You'll see a green arrow at the top, and we have to click refresh. it is not like that with chatango, the old chatroom, and most chat services."

Offline Adonix

  • Administrator
  • Hero Member
  • *****
  • Posts: 878
    • Chat4all
Re: Stay logged on doesn't + refreshing stops
« Reply #1 on: May 28, 2018, 02:25:54 PM »
It does time out by design. There's a poller which queries the server for new shouts, and updates it if something changed. At some point it will time out to save server resources. There is no reason to continue to query the server if nothing happens. Most shoutboxes are not used as chatboxes (it was not designed as a chatbox but more like a commenting box), and as such do not have a high frequency of new shouts.

Timeouts happen if there hasnt been an update for:

Guest: 5 minutes
Logged in user: 60 minutes

So as a registered and logged in user, the browser auto-queries the server for 60 minutes to see if anything new happened. In my opinion it is reasonable for it to time-out after 60 minutes (360 queries) since the chance of anything happening anytime soon after that is low, and wastes resources. The timeout timer resets itself if an uodate happens.

Some time after the time-out happens, the server will also invalidate and remove the session.

The shoutbox does have an option to stay logged in. This will set a cookie on the client's browser so that the user will be auto logged in when he loads the shoutbox.
« Last Edit: May 28, 2018, 06:47:07 PM by Adonix »
Tempus fugit et nos fugimus in illus
- Ovid Fasti


Offline Chatter

  • Newbie
  • *
  • Posts: 27
Re: Stay logged on doesn't + refreshing stops
« Reply #2 on: May 29, 2018, 07:25:36 AM »
I often quit the browser for several hours.  When I come back, I nearly always have to log in again, even with cookies.  (I keep a separate window open for the archives, but that reverts back to the non-archive recent shouts.)

Offline Adonix

  • Administrator
  • Hero Member
  • *****
  • Posts: 878
    • Chat4all
Re: Stay logged on doesn't + refreshing stops
« Reply #3 on: May 29, 2018, 11:03:52 PM »
I often quit the browser for several hours.  When I come back, I nearly always have to log in again, even with cookies.  (I keep a separate window open for the archives, but that reverts back to the non-archive recent shouts.)

Just to make sure, ive tested this today by leaving my own session open with auto-login enabled. Hours after it expired (and my session was gone), I refreshed the page and I was logged in again.
Tempus fugit et nos fugimus in illus
- Ovid Fasti


Offline Chatter

  • Newbie
  • *
  • Posts: 27
Re: Stay logged on doesn't + refreshing stops
« Reply #4 on: May 30, 2018, 04:29:43 AM »
I'm not exactly sure the scenario to reproduce this, but I log on, then open an archive window, the quit the browser at some point.  Hours later, I start the browser and the archive window appears, but when I refresh it, it turns into a non-archive window (with me still logged in).
How do I get the archive window to remain an archive window across browser sessions?

Offline Adonix

  • Administrator
  • Hero Member
  • *****
  • Posts: 878
    • Chat4all
Re: Stay logged on doesn't + refreshing stops
« Reply #5 on: May 30, 2018, 12:20:50 PM »
That happens because your session timeout out and was eventually deleted on the server. When you refresh, it first sees that there is no session, so it refreshes to the pain page. Once there, it will create a new session, grab your cookie, does some checking,  and logs you in after that. By that time it no longer knows you were in an archive window.

I guess I could create a timeout ping, which I also have on the admin panel, which sends a 'ping' every X minutes to the server to keep the session alive.
Tempus fugit et nos fugimus in illus
- Ovid Fasti