Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing some scanner for Google Chrome cookies, as stored in a SQLite database. It also has an option to delete cookies, however I didn't find any ID field. The most similar is creation_utc, I don't have much info about it, but I found out that it is some kind of timestamp. I would like to know if this value is unique or not.

I need this because while deleting some cookies I use a few fields, and it is not an optimal way to do it. If creation_utc is unique, it would take less time to delete the cookies.

share|improve this question
up vote 1 down vote accepted

By design, each combination of domain and path can only have one cookie with a specific name. (If a server sends a new cookie, the old one is replaced.)

So even when the database has another primary key (like you're suggesting in your own answer), I still feel the domain and path should be the real primary key.

share|improve this answer
I used this time-stamp converter and found that value in database cannot be converted into time format because is too big. So I think Google Chrome uses some advanced time-stamp and counts milliseconds, it let use this as primary key. – ST3 Aug 26 '13 at 7:49

I have found an answer. I used query: PRAGMA table_info(cookies) it gave result all columns, their types and etc. One of the attributes was called pk (primary key). All columns had set to 0, but creation_utc is set to 1, so it is primary key.

share|improve this answer
This is, technically, correct; .schema Cookies tells you the same. Weird. – Arjan Aug 26 '13 at 8:09

I guess creation_utc = UTC when the cookie was created. So no, it doesn't guarantee uniqueness.

If you just want to delete cookies for a single site, you can use this answer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.