1

In chrome browser session not removing when client close the browser. I have tried to session expiration but its not working.

1 Answers1

0

Try this jquery window close event

window.onbeforeunload = function () {
    $.ajax({
      url: '<?php echo serverUrl; ?>/handle_session.php',
      type: 'POST',
      datatype: 'json',
      success: function(data) {
        alert("Successful");
      }
    });
    return "Do you really want to close?";
};

Hope this will help you.

NomanJaved
  • 1,324
  • 17
  • 32