Encountered in the development of such a situation:
Chrome (Google) browser, after performing certain operations need to close the current page directly, but using window.close (); invalid, can not close the current page.
Check that:
In Chrome, you must specify the window.location.href = "about: blank"; then call window.close (); method to close the current page properly.
How to determine browser type?
navigator.appName BrowserName = var;
IF (BrowserName == "Netscape") {
window.location.href = "the About: blank"; // Chrome browser must have the words to properly close the page
} else if (browserName = = "in the Microsoft Internet Explorer") {
window.opener = null;
}
window.close (); // Close
Thanks for reading, if any errors or deficiencies, please criticism