beforeunload works more reliably than unload

This commit is contained in:
Philipp Hancke 2013-12-30 09:31:08 +01:00 committed by Yana Stamcheva
parent 8f46d961ef
commit 301fa4a8a8
1 changed files with 1 additions and 1 deletions

2
app.js
View File

@ -363,7 +363,7 @@ $(document).ready(function () {
}
});
$(window).bind('unload', function () {
$(window).bind('beforeunload', function () {
if (connection && connection.connected) {
// ensure signout
$.ajax({