-2

I have a requirement to close the complete browser windows instead of closing a particular tab which I have opened.

I am able to close the tab which I have opened using javascript, but need to close the complete window.

James Z
  • 12,209
  • 10
  • 24
  • 44
Sree
  • 1
  • 5
  • 7
    No. Even if this were possible you should not do it, for the same reason that turning off your TV should not turn off your refrigerator. – nnnnnn Jun 07 '17 at 02:51
  • 1
    Possible duplicate of [How can I close a browser window without receiving the "Do you want to close this window" prompt?](https://stackoverflow.com/questions/57854/how-can-i-close-a-browser-window-without-receiving-the-do-you-want-to-close-thi) – Max Jun 07 '17 at 02:57
  • Why do you have that requirement? What scenario would validate your web application closing a user's entire browser? You might close down their internet banking, social, whatever. In short: you don't – rickvdbosch Jun 07 '17 at 14:13

1 Answers1

2

It is not possible to close the entire browser via JavaScript

j08691
  • 204,283
  • 31
  • 260
  • 272