Chrome 96 moved the cookie database, and half the tooling never noticed
The cookie file moved to Default\Network\Cookies. Code that reads only the old path reports an intact profile as empty, with no error.
3 min readDivyansh Singh
Somewhere in Chrome 96, the cookie database moved. It used to live at Default\Cookies inside the profile directory. It now lives at Default\Network\Cookies. That is the whole change, it happened years ago, and it is still producing bugs.
The reason it keeps producing bugs is not that the move was obscure. It is that the failure it causes reads as a completely different problem.
The failure mode
Consider code that counts the cookies in a profile. It opens Default\Cookies, finds nothing there, and reports zero.
Zero is a valid answer. A fresh profile has no cookies. A profile that was just cleared has no cookies. Nothing about the number zero says "I looked in the wrong place", so the code does not raise, does not warn and does not log. It returns a number, and the number is wrong in a way that is indistinguishable from the number being right.
Now put that count in a user interface. A profile holding several hundred cookies displays as empty. The operator concludes their profile was wiped, which is the single most alarming thing this category of software can tell somebody, and it is not true.
This is the general shape of the worst class of bug in file-format work: the difference between absent and empty collapses, and every downstream consumer trusts the wrong one.
What it looks like now
The current layout, on Chromium builds since 96:
Default\
Network\
Cookies
Cookies-journal
Local Storage\
Local Extension Settings\
Service Worker\
History
PreferencesThe file is still SQLite. The schema is still recognisable. Values are still encrypted at rest with a key held by the operating system's credential store, which is a separate problem for anybody trying to read them from outside the browser and is the reason cookie import and export is harder than it looks.
The move itself was part of a larger reorganisation of network state inside the profile. It is not a rename anybody needs to have an opinion about. It is a fact you either encode or get wrong.
How to be wrong about it safely
Three rules, in the order they matter.
- Distinguish absent from empty, always. A reader that cannot tell "the file is not there" from "the file has no rows" will eventually report data loss that did not happen. Return a result that carries the difference, and make the caller handle both.
- Check both paths and say which one you used. Old profile directories still exist; people import archives from tools that were written before the change and from backups older than it.
- Never let a count of zero become a claim about the profile. If the count came from a file that was not found, that is a diagnostic about your reader, not a fact about the operator's data.
Ward's cookie handling is built around the first of those, and it exists because of a neighbouring bug worth its own post: a cookie count taken the instant after the browser closes is not a count either, because Chrome's file handles outlive its process exit on Windows. Same shape, different cause, same consequence - an intact profile reported as empty.
The wider point about profile formats
Browser profile directories are undocumented, load-bearing, and change without notice. There is no specification. There is no compatibility guarantee. The layout is an implementation detail of a program that ships every four weeks, and the only reason any of this works is that the implementation details change slowly and visibly.
If you are building anything that reads a profile directory from outside the browser, assume the layout will move again, and design so that the move is loud. The version of this code that fails with an error naming a path is infinitely better than the version that returns a plausible number.
That is the entire lesson, and it cost somebody, somewhere, a very bad afternoon believing their cookies were gone.
How this post was checked
- Data source
- The profile directories Chrome 151 created on Windows 11 during a real warm-up sitting, in which 431 cookies across 150 hosts landed in Default\Network\Cookies and nothing was ever written to the older path
- Measured with
- Direct reads of the profile's SQLite cookie file, and Ward's own cookie reader, which checks both the current and the pre-96 path and says which one it used
- The claim
- A missing cookie database and an empty one are indistinguishable to a naive reader, which turns a path change into a silent data-loss report.
Divyansh Singh
Builds Ward at Digital Heroes
Divyansh Singh builds Ward, a Windows manager for many isolated browser profiles, at Digital Heroes. Most of his week is spent in the Chromium command line, the DevTools Protocol and Windows process behaviour. Every measurement quoted in these posts was taken on the machine Ward is built and tested on, with the browser or tool version written down beside the result, and the ones that contradicted what the documentation said are the ones that became posts.
Last reviewed . Corrections and bug reports: support@digitalheroes.co.in.
Ward is the desktop application these measurements came out of
Many browser profiles on one PC, each with its own proxy and its own device identity. Free plan, free account, nothing to buy today.