MoonPoint Support Logo




Advanced Search
August
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
2010
Months
AugSep
Oct Nov Dec


Sat, Mar 13, 2010 5:43 pm

Firefox and SQLite

Starting in Firefox 3, bookmarks and browsing history are stored in the places.sqlite file, located in the Firefox profile folder. On a Windows 7 system, the file will be in a directory similar to C:\Users\AcctName\AppData\Roaming\Mozilla\Firefox\Profiles\q3wdrb9w.default. AcctName will be the name for the particular account. The \q3wdrb9w.default is a specific example; you would see a sequence of 8 numbers and letters that is unique to a particular profile on that system followed by .default. Note: you will have to turn on the display of hidden files and folders to see the directory (see Show hidden files for instructions on how to do this for Windows 7).

Places.sqlite is used in Firefox 3 instead of the older bookmarks.html and history.dat files (the older files are left in the profile folder for backward compatibility).

I opened a places.sqlite file with SQLite. Note: Firefox must be closed when you try opening the file or you will get the error message "Error: database is locked".

C:\Users\Administrator\Downloads>sqlite3 C:\Users\Administrator\AppData\Roaming\
Mozilla\Firefox\Profiles\q3wdrb9w.default\places.sqlite
SQLite version 3.6.23
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite>

I then used .tables to see what tables were in it.

sqlite> .tables
moz_anno_attributes  moz_favicons         moz_keywords
moz_annos            moz_historyvisits    moz_places
moz_bookmarks        moz_inputhistory
moz_bookmarks_roots  moz_items_annos

The places.sqlite file contains the following tables:

You can see what the columns are in a table using the .schema command, so I can use .schema moz_bookmarks for further information about the "bookmarks" table.

sqlite> .schema moz_bookmarks
CREATE TABLE moz_bookmarks (  id INTEGER PRIMARY KEY, type INTEGER, fk INTEGER D
EFAULT NULL, parent INTEGER, position INTEGER, title LONGVARCHAR, keyword_id INT
EGER, folder_type TEXT, dateAdded INTEGER, lastModified INTEGER);
CREATE INDEX moz_bookmarks_itemindex ON moz_bookmarks (fk, type);
CREATE INDEX moz_bookmarks_itemlastmodifiedindex ON moz_bookmarks (fk, lastModif
ied);
CREATE INDEX moz_bookmarks_parentindex ON moz_bookmarks (parent, position);
CREATE TRIGGER moz_bookmarks_beforedelete_v1_trigger BEFORE DELETE ON moz_bookma
rks FOR EACH ROW WHEN OLD.keyword_id NOT NULL BEGIN DELETE FROM moz_keywords WHE
RE id = OLD.keyword_id AND NOT EXISTS ( SELECT id FROM moz_bookmarks WHERE keywo
rd_id = OLD.keyword_id AND id <> OLD.id LIMIT 1 );END;

A diagram of the layout of the tables provides further information as does the The Places database.

I can see that there is a column named "title". So I can view the value for "title" for all entries in the table with select title from moz_bookmarks. Note: you may see a lot of what may appear to be extraneous bookmarks, i.e. webpages not bookmarked by the user. That's because you also see what you would see if you clicked on Bookmarks, Bookmarks Toolbar, Latest Headlines.

You can exit from sqlite with .exit, .quit, or Ctrl-C.

If you prefer a GUI to browse SQLite databases, you can use SQLite Database Browser, which can provide a graphical interface for browsing the databases on a Windows system.

SQLite Databse Browser

To install the program, just unzip the files in the .zip file, once you've downloaded it, to the directory you want to use for it.

References:

  1. SQLite
  2. Locked or damaged places.sqlite
    MozillaZine Knowledge Base
  3. Places.sqlite
    MozillaZine Knowledge Base
  4. The Places database
    Mozilla Developer Center
  5. SQLite Database Browser
    SourceForge
  6. Improving Iceweasel Performance
    April 3, 2009
    Zenwalk Support

[/network/web/browser/firefox] permanent link

Tue, Aug 05, 2008 7:35 am

Web Developer Extension for Firefox

The Web Developer extension for Firefox adds a menu and a toolbar to the browser with various web developer tools. It is designed for Firefox, Flock and Seamonkey, and will run on any platform that these browsers support including Windows, Mac OS X and Linux.

You can install the extension by simply clicking on the link for it. When it is installed, you will be notified you should restart Firefox to complete your changes.

The extension provides the capability for one to easily view the headers or CSS information for a page, check for Section 508 compliance, display the dimentions of images on the page, and many other capabilities useful to web developers.

[ More Info ]

[/network/web/browser/firefox] permanent link

Blosxom logo