<body onunload="notReady()">
<script >
function notReady(){
alert("closing")
}
</script>
</body>
it works only when refreshing the page or clink some link on the page and the page is actually unloading, but not when it's closing.
why ? and how to make it work?
It should be work,
window.onbeforeunload = function() {
return "closing!";
};