Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

...the whole window with ctrl+q.

OMG I've never done that but now that I know about it I'm very afraid. If I do it tomorrow I'm blaming you.



Thankfully, Chrome has a built-in feature to prevent this from happening (on OSX at least). Just go to Chrome > Warn before Quitting and make sure there's a checkmark next to the option.

Now, if you accidentally press Cmd + Q, it should prompt a "Hold Cmd + Q to Quit" instead of actually quitting.


Or, Settings > On Startup... "Continue where you left off". This will restore your tabs after launching Chrome.


I disabled that warning because it's annoying every time I want to close the browser, even without the dangerous keyboard shortcut. If it happens, you can go to the menu and find "recent tabs" or just ctrl+shift+t.


If you do this in Firefox, you can go to History -> Restore previous session. This will bring up all the tabs you had open last time it quit.


This helps: https://addons.mozilla.org/en-US/firefox/addon/customizable-...

Also, I made a mistake, it doesn't close the window. It closes all windows at once. Be afraid!


ctrl + q very appropriately quits the application. If this came as a ticket to me, I'd close it as working as expected.


Traditionally applications have asked the user if they're sure they want to quit. That's a no-no these days, but it's still a reasonable choice in situations where the cost of quitting might be high (there's unsaved content, or the app takes a long time to start, or it's impossible to persist the current state of the application).

For some time, the Chrome team refused to implement a 'Sure you want to quit?' popup due to a general anti-popups consensus. They also refused to implement a checkbox to enable that behavior due to a general anti-configuration consensus. They've since relented on the latter.


Mozilla Firefox used to have a setting under options/preferences to disable loading images and loading javascript. People complained and said this should be removed as not enough people use it and that people who use it can create/use an add-on to do the same.

It is not easy to find a right balance between providing adequate functionality while avoiding information overload. The web is still evolving. We are learning and we will do better (overall) as time goes by. :)


... and then you'd spin it off as a feature (or design review) request for better handling of accidental quit actions, right?


I like this idea. I will try to remember this because it is the perfect answer in situations like these...


Ctrl-Q typically preserves the session though, so all non-ajax sites will come back as they are, including partially filled forms.


Yeah, if you don't care about privacy and save such data to disk as active session, active browser tabs, history, cookies, etc. Those should be RAM only for privacy reasons and never stored to any medium which can store those for extended periods.


I've done it enough times that I was finally motivated to figure out to set browser.showQuitWarning=true in about:config.


The other reason I enable browser.showQuitWarning in Firefox is because you can Save and Quit instead of just quitting.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: