Skip to content

Instantly share code, notes, and snippets.

@axiaoxin
Last active January 3, 2016 23:39
Show Gist options
  • Save axiaoxin/8536605 to your computer and use it in GitHub Desktop.
Save axiaoxin/8536605 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
window.onbeforeunload = function(){
$.get('/accounts/logout')
return "close";
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment