Check if the opened browser // window is closed or not window.closed // false To check if an opened browser window is closed, you can use the closed property in referenced window object in JavaScript. How to check if an opened browser window is closed or not in JavaScript?