Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close Browser without Prompt

Is it possible to close browsers, using JavaScript, PHP, or HTML without a prompt?

I was using this answer: How can I close a browser window without receiving the "Do you want to close this window" prompt?

I was using Internet Explorer but it has since been updated to version 10 (soon to be updated to 11) and this exploit does not work.

If there is a solution in a different (but updated) browser, that could work as well.

like image 992
jlrosenberg Avatar asked Jul 17 '14 15:07

jlrosenberg


People also ask

How do I completely close a browser?

Click on the "X" button in the upper-right corner of the browser window to close it. You can also click "File" in the upper-left corner and then choose "Exit" to close the browser. For an alternate method, push "Alt" and "F4" simultaneously to close the browser using a Windows shortcut.

How do I close a window without?

Alt + F4: The Windows keyboard shortcut for closing applications, explained. Alt + F4 is a Windows keyboard shortcut that completely closes the application you're using. It differs slightly from Ctrl + F4, which closes the current window of the application you're viewing.


1 Answers

  • HTML can't do anything programatic. It's just markup.
  • PHP can only do programatic stuff at your server, not the browser, so no solution there either.
  • Finally, you cannot do it in JS either (unless it's a window opened by a script).

Imagine visiting a web site that closed your browser and you lost all of your open tabs.

like image 75
Shell Bryson Avatar answered Oct 08 '22 12:10

Shell Bryson