Currently, I am working on a web application that uses a master page. I need to be able to detect when the user is closing the browser so that I can raise an event to clean up session variables. I attempted using the unload JavaScript event, but it seems to fire whenever I navigate from page to page. Does anyone have any suggestions or ideas on how I can accurately detect when the browser is being closed?