<script type="text/javascript"> var logout = function() { var xhr = new XMLHttpRequest; xhr.open("GET", "logout.php", false); xhr.send(null); }; var winNumber=1; window.onload = function() { winNumber=winNumber+1; }; window.onbeforeunload = function() { winNumber=winNumber-1; if (winNumber === 1) { logout(); } }; </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)