PC browsers: ------------ Netscape 4.06 - Prompts the user about trying to close a window (I didn't see this message, someone else tested it for me). Netscape 4.80 - closes window without a prompt. MSIE 5.0 - prompts the user. MSIE 5.5 - Can't find anyone who has IE5.5 so untested there. MSIE 6.0 - closes window without a prompt. MSIE 7.0 - prompts the user for the first 3 buttons but will close the window (if it's the only tab instance, otherwise will close the whole window, not just the tab instance) without a prompt for the 4th button only. Netscape 7.0 and 7.1 - closes the window without a prompt for the first 2 buttons, will report an uncaught exception regarding conversion of JavaScript argument arg 0 in the javascript console for the 3rd button and will close the window without a prompt for the 4th button. Netscape 7.2 - will refuse to close the window for the first 2 buttons (javascript console will notify "Scripts may not close windows that were not opened by script."), will report an uncaught exception regarding conversion of JavaScript argument arg 0 in the javascript console for the 3rd button and will close the window without a prompt for the 4th button. Opera 7.x, 8.x & 9.x - closes the window in all 4 cases without a prompt. Mozilla 1.4 - No prompt, just an information message "Scripts may not close windows that were not opened by script." in the Javascript console. Mozilla 1.5b - refuses to close in both cases: in the first case, the javascript console will report the information message "Scripts may not close windows that were not opened by script.". In the second case (Hikks), the javascript console will report a conversion error (NS_ERROR_XPC_BAD_CONVERT_JS). Firefox 2.0.0.13 - refuses to close the window (if it has only 1 tab opened) or the tab in all 4 cases. The error console will report "Scripts may not close windows that were not opened by script." Safari 3.1 (build 525.13.0) - refuses to close for the first 3 buttons but will close the window without a warning or a confirm prompt for the 4th button. MAC browsers: ------------ AOL For Mac OSX v. 10.3 - closes the window without a prompt IE 5.2.2 for Mac - closes the window without a prompt Netscape 7.02 for Mac OSX - Does nothing, and after attempting to open, Netscape must be rebooted
MSDN Reference
on close method:
Invoking
the window.close method on a window not opened with script displays a
confirmation dialog box. Using script to close the last running instance
of Windows Internet Explorer also opens the confirmation dialog
box.