I have tried many methods to detect browser close event through jQuery or JavaScript. But, unfortunately, I have not been able to detect the close. The onbeforeunload<
onbeforeunload<
jQuery .bind() has been deprecated. Use .on() instead
$(window).on("beforeunload", function() { runBeforeClose(); });