To detect browsers in JavaScript we use the same logic as in PHP. To detect the tab change we use pure JavaScript without jQuery etc. How to detect browser name and version using javascript or jquery in asp.net. Answer 1 If I get you correctly, you want to know when a tab/window is effectively closed. I've attached two screen shots showing IE8 on XPSP2 in both IE8 mode and IE7-compat mode. In case you need to detect several browsers, and you’re working with PHP, the Browser Detect class is a very useful tool for detecting more than 20 different browsers. To detect if JavaScript is disabled in a web browser, use the