As far as I know, it is impossible to detect the browser close separately from the browser update, because the browser does not provide a web page (window) with this information. As for your page and Javascript code, these two are one and the same.
Since you need browser information, the only way to get it is to use something that has access to this information, i.e. browser plug-in. But then you need to make a plugin for each browser and get access to each user. Since I doubt very much that you will find it worthwhile, the real answer to your question (as disappointing as it may be) is: stop trying to detect updates and close and move on.
machineghost
source share