-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Alejandro,
On 9/7/17 5:49 PM, Alejandro Vargas M. wrote: > Is there anyway to delete a session in Tomcat when the user not > logout correctly from the application, normally they not logged out > correctly, they just click on the "X" (they said), they click the > close button of Internet Explorer. > > I tried with $(window).unload using JS, but it works on every > refresh, not when close button on the browser is clicked. There is no reliable way to do this. The user can always unplug their network connection if they don't want their session to be killed when they close their browser. Sure, this is a pathological case, but it's indeed possible. The best thing for you to do is set your session-timeout value to the lowest tolerable setting for your users, and let sessions time-out due to inactivity. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJZscPWAAoJEBzwKT+lPKRYgRsP/03gvV8Vsaj7rYHMLFUBnvP2 ighdvTGEytnhdPqzc2F/31XIME57mdlZz1Mim9CcW2EiS8Yw8NeD1mR1d+5JJdIn zttevYFMJpbkcO01LMpMKaJ3IoZ84fKT4l5bhQIgijIk6NEqY01P663l4twKZxCb ZsF1udU6LZRXfnxyjriO1830rlqnKTfAxT7lWIFnHN2OPFlES0FfZVxxTxoNx1Jg Eb68Q3FxtXi88YiVkHi/MbCGMJ9sRMY9V9PI/UPoIln9vy8vYnHyqjksFdzBmMeU 2GXRUKud7U9JCM+iaHPWdmJI8bdc2sITRpT8yDTJp4T7u/Zu+dlENqa307csp1My XfskWOcUxzhIV1TpFH9KH9v4UPqIcMJLtWI4/w1vX0QKe97k2jI2NT4l/zYEKNMO vkXcWuRKcz0JbNkRlLT5pQ3NfE27bVw245XopDzqihJUDHYVcf4sLYJtB+Z6rLUH 71YMQnkBSbwJR5YP2h8KqL8/2XhJ1hN5j6804wsyQm/HaGyZirzYV4SFr4A54em5 Um1fMbI4PrVJycpbU12IiG7/hL18C8yhOBrwMHTpZdx6ZggA7xnU0cSw/cEuUHq7 EYcijkPEqGzqLs3UYTMavYyv6HbD5rNQLkGSbAWF065wDnUWCgeKMkXG4/+9VLUc vY8Ou1UlluoX5X7742y9 =Qoy6 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org