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

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

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -