This link has been bookmarked by 10 people . It was first bookmarked on 10 Aug 2006, by J wynia.
Note that this doesn't currently work in Firefox 1.5
Specifically, serialised as RDF/XML.
Early last year, Jamie Zawinski asked about how to extract information from Firefox's history.dat file and ended up having to write a Perl script to do it.
He actually got further than most - most people who try to access the data not via Firefox itself just give up. This is because Firefox's history is stored in a Mork file, which is an incredibly over-complicated and under-documented proprietary file format. You'll learn more about it by reading the comments on Jamie's post that you would by reading the docs.
Mork is used as a file format all over Mozilla, in both Firefox and Thunderbird in various points, but there are plans to replace it with SQLite in Mozilla 2.0 (see Unified Storage on the official Mozilla wiki) possibly with some interfaces made public via RDF (but I'm not 100% sure on this).
As it stands, there's an open bug asking for history.dat to be easier to parse (which will probably be fixed by the move to SQLite rather than anything else) which actually has a very useful piece of Javascript attached which will convert the Mork history.dat into an RDF/XML history file, which I personally use as a bookmarklet from my toolbar: export history.dat. Just drag it to your toolbar, load a local file in Firefox to ensure you're in a trusted context and click it like you would any other bookmarklet. It'll give you a security warning, which you can click "yes" to (if you trust my link - if not, you can get it from the bug linked to above, or look at the code yourself). It'll take a few seconds to kick in (or longer, depending on the size of your history) but will eventually ask you to specify a location to save the file to. Give it a name, and you're free to parse it with whatever you like (although preferably an actual RDF parser :)
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.