I can't count the number of times I have been closing windows or tabs and have accidentally a tab that I wanted kept open. In the past, it has been annoying at best and disastrous at worst, but now I no longer have any issues... why you may ask? Because I know a keyboard shortcut that is perhaps amongst the most useful in Firefox... Control-Shift-T . Yes that's all you need, the next time you accidentally close a tab and you want it back, simply hit Control-Shift-T and the tab will magically reappear again! Now that you know it, try to live without it.