If you're using Firefox you just make sure browser.warnOnQuit is set to True (out of the box, it's set to true.)
As far as Chromium goes, near as I can tell ctrl-Q does not work at all, which is something Firefox would do well to imitate.