Re: [Cppcms-users] Detect expired session
Brought to you by:
artyom-beilis
From: Christian G. <chr...@gm...> - 2012-07-07 09:16:20
|
> > > >is there a way to detect if a valid session gets expired? > > If the session is expired you will get an empty session - i.e. > the session would not be loaded. > okay... but what is the difference between a user that was never logged in and a user which session expired? > > > > I would like to inform logged in users that their session has > > expired > > What do you mean? > > If the user had lost the session due to timeout it would have to login > again. > > > There are also several models of session expiration: > > http://cppcms.com/wikipp/en/page/cppcms_1x_config#session > > Sessions are working fine that's not my problem! > > > and that there may be some data lose > > (changed values withoutsaving them). > > See, NEVER store valuable information information > > in the session. This is not what the session is for. > > Session may expire, be deleted, the user may loose the > cookie. So sessions is not good for this purpose. > I may be more clear here. the app i am developing is used to configure an embedded linux device (network settings etc). now i have a feature request to get informed if a user has changed some values in a html form (can be detected via ajax etc) went to drink a coffee for 13 minutes, but the session is only valid for 10 minutes. now the user comes back an filled out the form and presses apply. now he sees the login form again and wonders what happened to his changes. now it would be good to see a message in the login form that not all changes could be applied,due session timeout. thanks |