Time-outs in LC Server?
Alex Tweedly
alex at tweedly.net
Fri Jul 26 03:03:45 EDT 2019
Great! So glad you got to a successful conclusion.
Alex
Sent from my iPhone
> On 25 Jul 2019, at 17:12, Rick Harrison via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> 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
>
>
> _______________________________________________
> 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