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
Difference Between Real Estate Agent & Realtor
Exit Strategies in Private Equity
Experience
The Sacred Ashes Grim Dawn
Ark Survival Jellyfish
Bellingham Craigs List
Tbg95Co
Virginia Henderson: Need Theory Study Guide
Critiques de la série Z Nation
Forum R1Rcm Com Ultipro
Eemax Eem24027 Reset Button
Edible Arrangements Clifton Park
New Scammer Pictures 2022 Female
Why are we ticklish? Here’s what we know about our silliest defense mechanism.
Allmovieshub. In
48 Hours Season 35 Episodes
Troy Eugene Wigley I Survived Ellen Halbert
Panter Belico Net Worth
Leyla Star Session
450 Miles Away From Me
Culver's Flavor Of The Day Ann Arbor
Rachaelrayshow Com Recipes
9-1-1 Kidnapped Boy Episode Cast
Eos Fitness Irvine
Walmart Smart Styles Near Me
Raiders Bane Enchantment
Chets Rental Chesterfield
Federal Express Drop Off Center Near Me
415-261-2242
Bellapyr
Sunnyside Kaiser Pharmacy Hours
Sam's Club Near Wisconsin Dells
Omni Id Portal Waconia
At&T Outage Today 2022 Map
Ultimate 2024 Guide to Bangkok Freelancers and prices
Arre St Wv Srj
Camwhor*s Bypass 2022
Tmo Store Near Me
Best Online Bingo Sites - Play For Fun or Real Money
Sauna Konfigurator - Ihr Weg zur Entspannung | Wellness4Me
Obituary for GARY ALAN YOUNGS | After®
Aabb Investorshub
He bought a cruise ship on Craigslist and spent over $1 million restoring it. Then his dream sank
DEVIANT DESIRES| POWER BOOK II - 19. - Page 2
Mychart.exact Sciences Labs Com
Www. Kdarchitects .Net
All Obituaries | Lynch-Green Funeral Home | St. Marys PA funeral home and cremation
Neos Urgent Care Springfield Ma
Grossest Cyst Removal Youtube
Judy Joo Husband David Allen
Best Gk Fifa 22
Glencoe Algebra 2 Chapter 3 Answer Key Pdf
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.