I have an onUnload event handler in the body tag of my page. It calls a function which sends an Ajax request to the server. Everything functions when I navigate away from the page, but refreshing the page never sends a request to the server.
One possible reason is that a refresh doesn't allow Ajax requests? does that make sense?
Heres the code:
<body onUnload='logout();'>
function logout(){
if (leaving)
$.get('../manage.php', {action: 'logout'})
}