Search code examples
javascriptgoogle-chromeinternet-explorersafarimozilla

How to close browser entirely using JavaScript


I want to close my full browser using JavaScript.

I used

window.close()

and also

self.close()

and also

 var win = window.open('', '_self');
 window.close();
 win.close();

and also

var win = window.open('', '_parent');
win.close();

None of these give me any benefit in this regard.

Is there anything else in JavaScript which will help me to close my browser instead of only a tab and also will work in all browser?


Solution

  • Just to let you know, you can only close windows with Javascript that were opened by it