views:

5000

answers:

1

I've gradually come to fully rely on Firefox's ability to recover my tabs after any kind of crash. That faith was not entirely ill-founded but what I didn't have a contingency plan for was accidentally closing the Firefox window and saying not to save the session. That just happened when my dad borrowed my laptop to check his email. Oy.

Of course the full browser history is there but the dozens of tabs I had open are lost in a massive sea. I ran "uptime" to see the time of my last reboot and looked for a cluster of URLs all opened around that time, but either I'm missing it, or the "last visited" time doesn't work that way. In any case, I thought others might know a better way to recover the tabs, or have hacked up something to fish them out of Firefox's history or something.

(The lesson for the future of course is to just save everything to delicious (or wherever) and not rely on your browser state! I'd also be interested to hear what systems others use to deal with this preventively.)

ADDED: I know prima facie this seems insoluble (after all, I, or my dad, explicitly told Firefox not to save the tabs) but as an example of something that could be done (and perhaps this qualifies this question as programming related after all)...

If Firefox stored both when the the URL was opened and when it was closed then you could extract your tabs from your history by erasing the very recent history and then fetching the URLs that were opened but never closed. So...

The Real Question

Does there exist an algorithm that can infer the list of open tabs based on the following inputs:

  • list of URLs and associated fields in the browser history
  • the time of the fateful dismissing of the Firefox session.

If anyone can show that that's possible, I'll code it up and make it available as an answer here.

+1  A: 

There are several add onns that deal with "sessions" in firefox. But still, if you close it and say NOT TO SAVE the session, then it's exactly what he's gonna do.

I really don't see what else can be done here.

ldigas
Firefox has an option to automatically save the session when exiting.
Greg Hewgill
Greg, that's very helpful, at least for the future!
dreeves