Your SAS programs, embedded in web apps and elsewhere

SPWA: way to have warning before timeout?

Posts: 1,396

SPWA: way to have warning before timeout?


Currently the SPWA times out users after some amount of time, and requires them to log in again.  (I'm not an admin, assume this is configurable)

Was wondering if there is an easy way for an admin (or even better a developer who does not have admin rights), to have a warning dialog box pop up before a user is logged off?

We have had cases where during a demo/meeting review, someone has a graph open in their browser for 10 minutes discussing it.  Then they click a point to drill down and get prompted to re-login (and are thrown back to the beginning).

Would rather have it work like my bank does.  Where if I stare at a single screen too long, they pop up a "Are you still there?" box with a 30 second count down to automatic logoff unless I respond.

Any easy way to do this using just the default SPWA interface?



New Contributor
Posts: 3

Re: SPWA: way to have warning before timeout?


That's a great idea ! Users in my organisation have the same problem.

I don't know of a way to do this easily.

My first thought is you could try and have the browser do the job like this :

1) get the default session timeout in the stored process sas code with

     stpsrvgetn('default session timeout')

2) with some javascript, repeatedly check if the time has run out :

     setInterval function can run a function in fixed intervals

     new Date().getTime() gets the current time

3) 30 seconds before time runs out you show a dialog (jquery-ui is good for this)

4) not sure how to keep-alive the session but maybe something like calling ajax on a dummy stp ?

The problem with this solution is that it relies on the browser too much and that you have to put the code in all your stp.

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation