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:
- login application
- go specific page , copy page url
- close browser
- 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
Post a Comment