Google chrome has an inbuilt feature to close the browser when the last tab is closed. This is very convenient for avid users who use the middle click to close the tabs. Just close all the tabs with middle clicks and you are done.
However, firefox doesn’t allow users to close the last remaining tab using middle click. You can close all but the last remaining tab using the middle mouse click. So, one has to use the browser’s close button to close the browser completely. Luckily , there is a workaround for this – firefox close tab keyboard shortcut. Pressing Ctrl + W closes a tab in firefox (and Chrome for that matter). You can close all the open tabs using this keyboard shortcut, including the last one, thereby closing the browser. The shortcut works on Chrome as well (No idea about IE7+ as I do not have it).
It might be a little annoying at first, but once you develop a habit to use this keyboard shortcut instead of middle click, you’d just love using it.
You can visit firefox support page for an updated list of keyboard shortcuts available.