Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Usersession and closing Browser...
#1
Question 
Hello,

-How to close (Killing it) the usersession if the page or the browser is closed ... ? 
(in the case the user don't use my own close button...)

With best regards
Mikey
Reply
#2
Sessions will automatically time out and be purged after the session timeout if there is no activity from the user.
Reply
#3
Thank you Kudzu, but what's happen's if user re-open the application before the timeout ?
-Is there a solutuion to force the purge just after closing the page or browser ?

With best regards,
Mikey.
Reply
#4
If the user reopens the app before the timeout, he will initiate a new session. he cannot use the old session anymore.

Mohamed
Reply
#5
Thank You Mohamed for your response.
I was wondering this, because, when I re-open, I've got page order in the same state after the user close the browser...
I'will try to work to force my page order...

With best Regards,
Mikey
Reply
#6
It depends on your session settings. If you use cookie mode, they will reconnect to the existing session.
Reply
#7
There is no reliable way to detect when the user closes the browser. The best way is to just let the session time out.
Reply
#8
Thank You Mohamed for your response.
I was wondering this, because, when I re-open, I've got page order in the same state after the user close the browser...
I'will try to work to force my page order...

With best Regards,
Mikey

Hello Kudzu !

Great information and idea for cookies Smile
I will try to work arround this for reconnection if browser is closed by accident ...

I'm new on Intraweb... Tons of things to learn...Smile Great tool !

Big thank you again for your help !
With best regards,
Mikey
Reply
#9
(04-17-2018, 02:46 PM)kudzu Wrote: There is no reliable way to detect when the user closes the browser. The best way is to just let the session time out.

Some other options that help...

You can enhance this by using a relatively short timeout.  But, that can cause the user to lose the session when working on a form.

The antidote to that is to set the form KeepAlive to True.  This causes an automatic message to be sent to the server to satisfy the timeout.  The KeepAlive message is timed to occur on a timing of about 1/3 or 1/4 the timeout so doesn't really increase the load much.  The user will never time out so long as the form is in the browser.

A caveat:  On many mobile devices (iStuff for sure) you will only get the KeepAlive when the form is active.  If the user brings up another form (placing your app in the background) it will not get the keepalive. For this reason, I set a different sessiontimeout for mobile sessions.

You can get a pretty responsive "timeout" without killing good user sessions.  However, if the user never closes the window (on a regular desktop) the session never times out from the built in timeout.   You can still create your own homemade timeout if necessary.

So... LOTS of options.

Dan
Reply
#10
To use cookies, its a simple setting in the ServerController.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)