I have been looking all day for a PHP or JavaScript solution to do this.
I would like to alert the user their session is about to time out (popup), ability to extend the session time.
Here is a visual if you need one on this page
EDIT:
jQuery is the framework if that helps
It’s relatively easy:
Build a JavaScript timer that fires in (session lifetime – 5 min) minutes using
setTimeoutHave the
setTimeoutfunction show a confirmation dialog, e.g. using jQuery UI DialogIf the user wants to prolong the session, make an Ajax request to an PHP file. If the file uses sessions, this will work to “touch” the session’s lifetime
After making the request, set another
setTimeoutthat will fire when the session is about to expire again.