How to obtain the browser session timeout value ? (2024)

How to obtain the browser session timeout value ? (1)

Richard Pearce

Rank: #5470

How to obtain the browser session timeout value ?

895Views

11Comments

Question

Hi !

In my web application I want to obtain the browser timeout info: either the timestamp the session will end, or the timestamp the session started plus the session timeout in minutes will do fine.

How can I do this ?

Cheers, Richard

10 Sep 2019

Copy post link

How to obtain the browser session timeout value ? (2)

Jorge Martins

MVP

Rank: #21

Hi Richard,

the session timeout is not browser-decided, it's a configuration you set on your web application server. The most common default setting for web servers is 20min.

10 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (3)

Daniël Kuhlmann

MVP

Rank: #5

Hi Richard,

Why you need it?

If you need it to be a different value, you can customize it with the factory configuration component

https://www.outsystems.com/forums/discussion/34866/factory-configuration-how-to-change-the-session-timeout-in-factory-configuratio/

Regards,

Daniel

How to obtain the browser session timeout value ? (4)

Richard Pearce

Rank: #5470

Hi guys,

Thanks for the responses but I'm not sure you understood my question. I want to obtain either the timestamp the session will end, or the timestamp the session started plus the session timeout.

Cheers, Richard.

10 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (5)

Jorge Martins

MVP

Rank: #21

Hi Richard,

The timestamp the session started plus the session timeout is useless... the timeout countdown is reset every time the user interacts with the server.

If you want to determine when the countdown for timeout starts, you can can go to the Logic tab, right-click on the Server Actions folder, select Add System Event and then On Begin Web Request. This will create an action that will run every time your module handles a new request. Here you can store in Session variable, or in an Entity the last time it was "touched". If you know the timeout (this is a server configuration), you can determine the timestamp the session will expire. You would need to add this to every module you want to collaborate to determine this info though.

Another option is adding to the default Layout of your screens a Web Block that doesn't have any UI but on its preparation does the same kind of logic. Screens that are built afterwards will include this by default, older screens you will have to manually add the Web Block to them.

10 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (6)

1 reply

12 Sep 2019

Show thread

Hide thread

How to obtain the browser session timeout value ? (7)

Richard Pearce

Rank: #5470

Jorge Martins wrote:

Hi Richard,

The timestamp the session started plus the session timeout is useless... the timeout countdown is reset every time the user interacts with the server.

If you want to determine when the countdown for timeout starts, you can can go to the Logic tab, right-click on the Server Actions folder, select Add System Event and then On Begin Web Request. This will create an action that will run every time your module handles a new request. Here you can store in Session variable, or in an Entity the last time it was "touched". If you know the timeout (this is a server configuration), you can determine the timestamp the session will expire. You would need to add this to every module you want to collaborate to determine this info though.

Another option is adding to the default Layout of your screens a Web Block that doesn't have any UI but on its preparation does the same kind of logic. Screens that are built afterwards will include this by default, older screens you will have to manually add the Web Block to them.

Hi Jorge,

Thanks for the suggestions. For a warning before a timeout on a critical workflow the first suggestion might work, but for a message after timeout both incur a large overhead and are probably overkill. For the latter I think I might raise an idea with Outsystems for them to create a new Timeout Exception.

Cheers, Richard.

12 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (8)

Daniël Kuhlmann

MVP

Rank: #5

Richard,

What is it that you try to do with that the session timeout information?

Regards,

Daniel

10 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (9)

1 reply

12 Sep 2019

Show thread

Hide thread

How to obtain the browser session timeout value ? (10)

Richard Pearce

Rank: #5470

Daniël Kuhlmann wrote:

Richard,

What is it that you try to do with that the session timeout information?

Regards,

Daniel

Hi Daniel,

Firstly I would like to send the user a message when they have timed out. Optionally for some critical workflows I would like to give them a 2 minute warning.

Cheers, Richard

12 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (11)

Eduardo Jauch

MVP

Rank: #7

Hi Richard,

A Timeout exception would be thrown only when the user tried to reach the server, after the timeout happened.

This is because the server just do not keep any information about users or requests in memory. After a response is sent back to the client, the server just forgets everything about the request made. The client simply doesn't exists anymore for the server. It would never know when the session would timeout.

Actually, if the user makes a request to an anonymous page after the timeout, the session is reset, but other than that the user may not even notice.

If the request is for a non anonymous page, a security exception will be thrown.

A timeout exception, on this context, could be still interessant, but...

Cheers.

12 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (12)

J.

MVP

Rank: #14

It's possible,

You have to know upfront what the IIS session timeout is. by default 20min, but it can be different :)

In any case, create a webblock. This will be included in your layout_webblocks, so that every screen is using it.

In the prep you (re)set a cookie -> this way the you keep having the samish sliding timeout..

With a simple js-heartbeat mechanism, you check the time with the cookie and call a fakenotify for example

if the timeout is within 2 minutes, then the fakenotify is called and you do a popup or something like that.

that logic is of course in that same webblock.

TL;DR; keep a cookie updated by actions on the server and use js-heartbeat to check the cookie and act accordingly

12 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (13)

Eduardo Jauch

MVP

Rank: #7

J, the pop-up would have to be done in Javascript, no? The fakenotify would reach the server and reset the counter...

12 Sep 2019

Copy comment link

How to obtain the browser session timeout value ? (14)

1 reply

12 Sep 2019

Show thread

Hide thread

How to obtain the browser session timeout value ? (15)

J.

MVP

Rank: #14

Eduardo Jauch wrote:

J, the pop-up would have to be done in Javascript, no? The fakenotify would reach the server and reset the counter...

No. It's a ajax-request, so the prep will not get hit. (and to be sure you might want to add some more info etc. etc.)

but it really does not matter, because at that point in time you are going to show the popup. preferably locking the screen of course ;)

12 Sep 2019

Copy comment link

Log in to Answer

How to obtain the browser session timeout value ? (2024)
Top Articles
China P/E ratio, 2001 – 2024
Carriage charges Definition | Law Insider
Jordan Lewis Leaks
Parent Portal Pat Med
Fen No Results
Forest Lake Dr
Geheimtipp Anna Maria Island- die schönsten Strände Floridas | Reiseblog und Fotografieblog aus Österreich
Winy Accident
Truck Trader Pennsylvania
Matt Severance Picks
Top Songs On Octane 2022
Page 4444 – Christianity Today
Wyze Recover Deleted Events
Dial Murray Obituaries Moncks Corner Sc
Meg Turney Nipple
The Creator Showtimes Near Baxter Avenue Theatres
Emiddio Botta Obituary
Veronica Correia titt*es
Oxford Covered Market: How To Visit + What To Eat & Buy! - Where Goes Rose?
5417873087
UNITE 7SECONDS Condition Leave in Detangler 60ml GWP 60 ml
Restaurants Near Paramount Theater Cedar Rapids
Final Schedule Cmu
5Gomovies
Ezstub Cross Country
Affordable Phone Plans Starting at $15/Mo. | Connect by T-Mobile
Results, presentations and reports
Texas Lottery Pick 3 Daily 4
Outlet For The Thames Crossword
Realidades 2 Capitulo 2B Answers
Walmart Tire And Lube Center Near Me
E 77 · Baureihe 177 · bay. EG3 · preuß. EG 701–25 Fotos
America Cuevas Discord
Gina Wilson All Things Algebra Unit 3 Homework 2
Aqha Points Chart
Patient Portal.aegislabs
763-298-8022
Sasquatch Taco Truck
Kristenhart Cam
Full Auto Switch For Smith And Wesson Sd9Ve
SF valley apartments / housing for rent - craigslist
Core Relief Texas
The Telegram Births - March 2000
Rise Menu Dispensary
Best New England Boarding Schools
Wray Thorn Net Worth
Fall River Ma Apartments For Rent Craigslist
Epower Raley's
Wanted Old Motorcycles 📞 www.wantedoldmotorcycles.com - wanted - by dealer - sale - craigslist
Workstation. Scentsy.com
Cheyenne Craigslist
Latest Posts
Article information

Author: Annamae Dooley

Last Updated:

Views: 6732

Rating: 4.4 / 5 (65 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Annamae Dooley

Birthday: 2001-07-26

Address: 9687 Tambra Meadow, Bradleyhaven, TN 53219

Phone: +9316045904039

Job: Future Coordinator

Hobby: Archery, Couponing, Poi, Kite flying, Knitting, Rappelling, Baseball

Introduction: My name is Annamae Dooley, I am a witty, quaint, lovely, clever, rich, sparkling, powerful person who loves writing and wants to share my knowledge and understanding with you.