Tuesday, June 21, 2011

Browser Session Management

First off, I admit I have a problem. I typically have 5-6 browser windows open with 10-15 tabs per window and that's just with one brand of browser. I sometimes have that many tabs/windows with two of the big three (IE, Firefox or Chrome) browsers going at the same time.

There are many reasons why I end up with so many open tabs:
  • I open a new window to search on something and open the links in tabs
  • I get easily distracted. I start to reading a page then switch to something else and don't want to close the tab knowing I will come back to it.
  • There are some tabs that are semi-permanently open (like gmail, Facebook, Twitter, Amazon Cloud Player).
  • I use open pages as a todo list.
Usually this isn't that big of a problem but it can become one. The biggest problem is memory usage. Over time all three browsers seem to leak memory (some worse than others - Firefox I'm looking at you) forcing restarts (and occasionally Windows wants to install updates and reboot). Having the browser re-open without losing all of my open tabs is a big selling point. 

Here is my take on the big three and session management.

Internet Explorer

IE is the worst of the three when it comes to session management. IE8 and 9 added a link to 'Reopen last session' (accessible on new tabs) but as far as I can tell it assumes all of your previously open tabs were in one window. If you do have multiple windows open and restart your computer only the last window closed is restored (which always seems to be the one with the fewest tabs). If your computer hard crashes and you restart IE it does ask if you would like to restore the previous session and this does reopen all windows and tabs. So full session information does seem to be stored somewhere just not surfaced to the end user.

Firefox

Early on Firefox itself did not have great session management but it had good add-ons like "Session Manager". If I noticed things running slow or saw Firefox memory usage spiking in Task Manager I could kill the browser and with Session Manager reload all of the tabs when it restarts. Firefox has now built this in as option to restore all open tabs.

Chrome

With Chrome I ended up having on of those 'doh' moments. I knew Chrome tracked all of the opened windows and tabs because if I restarted from a hard shutdown it would offer to Restore all of them. The problem was that if I noticed Chrome eating up a lot of memory there didn't seem to be a clean way to close all of the windows and completely restart the browser session. Since each tab spawns its own process there was not a single process I could kill like Firefox in the Task Manager. And if you clicked on the X in each browser window like IE the last window became the only one restored. Then I don't remember where I read it but I found out if you use the 'Exit' menu option from the Wrench icon it will close and remember all of your open windows and tabs. It was one of those 'aha' moments that made live easier. 

No comments: