Skip to content

Commit

Permalink
Make it compatible with onbeforeunload
Browse files Browse the repository at this point in the history
  • Loading branch information
jpic committed Dec 18, 2012
1 parent 1dd1b1b commit baf8404
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion session_security/static/session_security/script.js
Expand Up @@ -26,7 +26,8 @@ var SessionSecurity = function() {
// **Callback** for when session expires.
this.expire = function() {
$.get(this.LOGOUT_URL, function() {
document.location.href = sessionSecurity.LOGIN_URL + '?next=' + document.location.pathname;
var url = sessionSecurity.LOGIN_URL + '?next=' + document.location.pathname;
$('body').html('Your session has expired. <a href="' + url + '">Login again</a>');
});
}

Expand Down

0 comments on commit baf8404

Please sign in to comment.