Jump to content

Keep user session data


itognet

Recommended Posts

Scenario:

A unigui webshop, where a guest user have added items to the shopping bag.

The guest user refresh his browser, then the session get destroyed? and the user have to start over (shopping bag empty).

 

Would it be possible to have the guest user to return to his session (without using any logins)

and even be it that exact screen, eg. dbgrid filter

 

This is very easy in IntraWeb, but is it possible with uniGUI ?

 

Thanks.

Link to comment
Share on other sites

In such case use client IP address as unique key for saving temp data, when user disconnect and return again then you can use the IP address to restore his location and his data.

 

:::::BE CAREFUL::::  most of isp use dynamic IP for their customers and NOT fix IP, so keep that in your mind 

Link to comment
Share on other sites

You can log in the user automatically, so you only need to know which user,

and then pick up whatever he did last, and show the form where he left.

 

So how to ID the user? A cookie with fast expiration is probably the best

option. Public IP may be shared, but if combined with local client IP, within a short

timeframe, it should be pretty secure. E.g. WebRTC JS API and the ICE protocol

to get local LAN IP. It could be DHCP but within a short timeframe it should be

ok for less critical apps.

 

Last option to ID the user would be to log all mouse movements and key presses

and create a personal time/motion profile of the user, and check for matching patterns :)

Link to comment
Share on other sites

I dont know if any of you have worked with IntraWeb? 

But it is standard that you never lose your session or session data.

 

For example, if you check some checkmarks, and choose items from serveral listboxes. If you refresh, you will continues EXACTLY from where you left your session. 

 

As I understand I have to cookie every checkmark, every listbox, every dbgrid filter and so on and if refreshed apply the cockie data to all componenets. - I would have alot of work to do with handling this. 

 

What I am saying is:

 

Farshad, a suggestion for uniGUI could be a nonvisible component, uniKeepSession. 

If that component is dragged on the form, then it will handle everything so that a User/session cannot lose his session or session data. Done by cookies or a better technology.

  • Upvote 1
Link to comment
Share on other sites

Intraweb is obviously doing some state saving in the background then,

to a session state table, linking that post to a cookie.

 

But if you do auto-saving of form data, silently, 5 secs after no data change,

and link this to the user, and then to a cookie, you will get the same functionality.

 

If your fields are db-aware with a live query, it is just a timer that runs Post,

and the cookie can ID both the user and the form last used, taking him back.

 

You can also use a URL param to preserve a session during a refresh, since

the URL is read at servermodule.create, but to get that unique URL param you

may have to do some trick, like either having two apps, or getting the

isapi server to produce a random URL param that can function as a session ID.

 

But a session state component seems like a good idea. To get around the

need for informing about cookies, maybe a URL param would solve the issue.

Goodbye to clean uRL's then...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...