Retrieving Chrome tabs suspended by The Great Suspender

After a recent Windows crash, restarting Chrome would not open all the windows and tabs I had collected, despite its nice “Restore previous session” question.

None of the tips I found on the net helped recovering those tabs:

Anyway, I found that the tabs suspended by The Great Suspender were most likely not contained in the Tabs file, so where is that information stored?

By looking at the source it turns out that TGS stores its data in an IndexedDB.

To access this database, you need to open TGS’s extension URL chrome-extension://klbibkeccnjlkjkiokjodocebajanakg/suspended.html. Using F12 (Developer Tools) and selecting Resources, you find “tgs” under IndexedDB, containing the tables gsCurrentSessions, gsSuspendedTabInfo, gsPreviews, and gsSavedSessions.

Unfortunately, currently there is no way to export this data directly from the DevTools, so we need a little bit of scripting magic.

After copying and pasting from MDN’s IndexedDB API documentation and sample code and some trial and error, I finally completed a small Javascript script which, when entered in the Developer Tools’ Console, results in a JSON-formatted list of all suspended tabs:

var db; var result=""; var record=0;
var dbor ="tgs");
dbor.onsuccess = function(event) { 
  db = dbor.result;
  db.transaction(["gsSuspendedTabInfo"], "readonly")
    .onsuccess= function(event) {
      if (c){
      } else {

A single JSON record of a suspended tab looks like this:

  "title":".validate() | jQuery Validation Plugin",

Of course, you can process each tab’s record (c.value in the code above) any way you need.


3 Responses to Retrieving Chrome tabs suspended by The Great Suspender

  1. stereocool says:

    What if I can’t boot to my screen and I can only access my HDD from another PC? How can I open that database for looking into that precious session info?

    Thanks in advance and thanks already for the tip

    • devio says:

      Have a look at the files in directory [user]\AppData\Local\Google\Chrome\User Data\Default\IndexedDB\chrome-extension_klbibkeccnjlkjkiokjodocebajanakg_0.indexeddb.leveldb. Maybe it’s sufficient to copy them into your chrome profile. Just an idea though…

      • stereocool says:

        Oh shit it worked! 😀 It didn’t show up at first but I was able to recall them because they were listed nicely in the extension as nothing happened. Thank you.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: