
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2016 11:17 AM
We have set glide.ui.session_timeout to 15 minutes as per our own corporate policy.
We have also set glide.ui.forgetme as per ServiceNow hardened instance recommendations.
Has anyone come up with a good way to warn users before their session times out?
It seems like some combination of v_user_session and gs.getSession might be useful.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 08:57 AM
I've been working on a Platform session timer, you can view my code on my github. I'm still working on the documentation and we are testing in our corporate development environment. https://github.com/xxJimxx/SNTimeout/
Let me know what you think or if you have improvement suggestions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2016 11:23 AM
Hi Brian,
Please check the thread below. Hope it will help you.
Client script to return user session time left
Thanks,
Harshvardhan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2016 11:23 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2016 11:18 AM
I've been looking into this for a little while now and don't think it's quite what I want.
It seems like I should be able to put a business rule on v_user_session that starts a client timer for the user and resets it on update. Then I could use a UI Notification to warn the user.
Has anyone attempted this approach?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-14-2016 02:02 PM
Kalaiarasan P posted some client side code to countdown and alert:
function idleLogout() {
alert('Starting to kick you out');
var timer;
window.onload = resetTimer;
window.onmousemove = resetTimer;
window.onmousedown = resetTimer;
window.onclick = resetTimer;
window.onscroll = resetTimer;
window.onkeypress = resetTimer;
function logout() {
alert('You are being kicked out');
}
function resetTimer() {
clearTimeout(timer);
timer = setTimeout(logout, 3000); // time is in milliseconds
}
}
idleLogout();
I actually really like this in theory, but the problem is that it does not call resetTimer at the right times. For a Session timeout, the timer should only be reset when there is a call back to the Server, because the Server is what actually manages the session.
This is the difficultly. I need to figure out a way to run a timer on the server side that is reset on a server side call and then popup a client side alert on timeout.
I don't feel like I've seen a complete solution, yet.