Home > firefox, python > Save your current Firefox tabs and restore them later

Save your current Firefox tabs and restore them later

Problem

When you work on a project, usually you have lots of tabs open in Firefox: some Google results, related blog posts, API documentations, etc. If you use several machines, it would be useful to save the current tab list to a file, and restore the list on another machine and continue the work from where you stopped.

Solution

Save the current tab list

What you need is the URL Lister Firefox add-on (official home page is here). Once installed, go to Tools -> URL Lister…, copy the list to the clipboard and save it to a file, send it to you in e-mail, etc.

Restore the tab list

For restoring the tab list, use the script open_in_tabs.py. Example:

cat url_list.txt | ./open_in_tabs.py

Real-life scenario

You are working on a (hobby) project on your desktop machine. You feel like going to the library where you want to continue the project on your laptop. Just save the tab list and open the very same tabs on your laptop.

Related tip

If you need to restart Firefox and/or your machine, you can ask Firefox to restore your tab list. Go to Edit -> Preferences -> General tab, and next to “When Firefox starts“, select “Show my windows and tabs from last time“.

Categories: firefox, python Tags: , , ,
  1. Rockin
    March 14, 2011 at 16:38

    Great tip !

    But if you use Firefox (or Chrome), you can also use the TabCloud add-on which allows you to save a whole session of tabs, and which allows you to restore it on another computer.

    Pretty cool when you work on different machines, because you don’t have to worry about saving your list of URLs.

    https://addons.mozilla.org/en-us/firefox/addon/tabcloud/

    Kevin.

    • March 14, 2011 at 17:57

      @Rockin: Thanks. There is another related add-on called Bookmark Current Tab Set. However, if you have several tab sets saved, it becomes difficult to manage them. So I prefer saving them to files and manipulate those text files. But it’s just a question of taste.

      • Rockin
        March 14, 2011 at 18:05

        Yes, that’s right when you have a lot of saved sessions it’s difficult to manage them, that’s why i’m trying your solution :)

  1. No trackbacks yet.

Leave a comment