Possible Duplicate:
Handle Browser close in JavaScript?
How to detect a close of a browser using JavaScript or jQuery, I got the window.onbeforeUnload and $(window).unload() of JavaScript and jQuery respectively, but that even gets called on leaving of page,and etc... but I need only and only the close event, nothing else and only that.