So like most of you who are probably reading this, I’ve been playing with Google’s new browser, Chrome.
In this post, I’ll not be going into the differences between it and IE, nor comments on its EULA, its cool factor, etc. What I’ll be talking about is some things, some under the hood things, I’ve looked at.
Some background first.
One of the features of IE that I’ve come to rely on is that I can very easily sync my Favorites. This lets me easily, quickly, with no mus of fus, keep my fav’s on three machines all in sync (via Mesh). It’s simple, I don’t have to change my IE usage habits, etc. Sure it’s not very Web 2.0’ish, but that doesn’t matter to me. What I want is to just have my favorites be the same on my machines… Without that, I’m just not a happy web browser camper…
So one of the first things I looked for with Chrome is how I would sync it’s Bookmarks (aka Favorites).
a) Where are the Chrome Bookmarks stored?
The Chrome Bookmarks are stored in a file called “History” (no extension).
On my systems, I found the History file in the following paths:
Vista:
C:\Users\[YourUserName]\AppData\Local\Google\Chrome\User Data\Default\
XP:
C:\Documents and Settings\[YourUserName]\Local Settings\Application Data\Google\Chrome\User Data\Default\
b) What is the History file?
The History file is a SQLite v3 database.
c) Okay, how I can read/open/view the History file
There are a number of SQLite browsing tools available. The one I used, which was the first free one I found, was the SQLite Database Browser. It’s a fast download and can be run without installation…
Once you have a browsing tool, open the History file…
d) So where are the Bookmarks?
The magic is the “starred” table. This table is where the bookmarks are stored, what folder they are in, their order, etc.
The actual URLs are stored in the “urls” table (funny that… ;)
To get at the URL’s for them you join against the “urls” table.
SELECT starred.title, urls.url
FROM starred
INNER JOIN urls ON urls.id = starred.url_id
Okay… Now what?
Now what I’m thinking is that I need to write a utility that will export data from the History DB, put it into a file, sync that file (or post the data to a cloud storage area like S3 or SSDS?) and then write a import utility that will slurp in that file/data… Maybe use the starred.Date_Added column to intelligently add new items. But how to track deletes? hum…
Also I need to look around for the Chrome SDK/API/Doc’s etc to see if I’m being a lamer and if there’s a much easier way to sync/import/export bookmarks… ;)