javascript - how to invalidate session on browser close button? -


this question has answer here:

i using java web application jsp/servlet. if user closes browser without logging out specific page, session not invalidated automatically:

  1. login application
  2. go specific page , copy page url
  3. close browser
  4. open again browser , paste url have copied in 2nd step.

result: user can access same url expected: user must not access url once browser closed.

$(document).ready(function() {     $(window).bind("beforeunload", function() {          //post server , close sessions     }); }); 

Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -