Time-outs in LC Server?

Rick Harrison harrison at all-auctions.com
Thu Jul 25 12:12:27 EDT 2019


Hi Alex,

The solution turned out to be easier with no time checks involved.

I noticed that one of my variables ends up being blank when the
server times out.  So when the user attempts to do something,
the destination webpage performs a check at the beginning of 
the code to see if the variable is blank.  If it’s blank, I have
alternate code appear that tells the user they have been logged
out due to inactivity, and offers a dismiss message button that
links back to the login page.  It works quite nicely, and
I don’t have to check for every transaction in every format file.

Enjoy your day!

Rick



> On Jul 19, 2019, at 9:47 PM, Alex Tweedly via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> 
> On 19/07/2019 14:28, Rick Harrison via use-livecode wrote:
>> The following is a link to the javascript stuff I had referred
>> to before.  I just want a clean LC way to do the same thing.
>> 
>> https://stackoverflow.com/questions/9564602/how-to-know-browser-idle-time?noredirect=1&lq=1
>> 
> Sorry to be the bearer of bad news, but there is no such thing, and indeed, there cannot be!
> 
> That javascript code runs *in the user's browser", and so can easily keep track of idle time. or remaining time
> 
> Your LC code can only run on the server. And on the server, all you can do is - at the start of responding to a request - check how long it has been since the previous request from same user.
> 
> So that requires some storage between requests - whether in a database, or via cookie / session variable.
> 
> Alex.
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list