Why is cookies.sqlite bigger than it's supposed to be?
This article http://kb.mozillazine.org/Cookies states that cookies are mainly recorded in cookies.sqlite and permissions.sqlite . It also says that "Sometimes removing the cookies in the Cookie Manager is not sufficient and you need to delete the file that stores cookies in your Firefox profile folder ("cookies.sqlite" [...])".
I erased all my cookies (going to "Options" -> "show cookies" no cookies could be found), but my cookies.sqlite file still had 2.5 mb. I opened the cookies.sqlite file with DB Browser For SQLite and, as a matter of fact, nothing was shown (I even ran "SELECT * FROM table_name", no results also). But when I opened it with Notepad++, I could find a great number of sites in it.
The permissions.sqlite also has 6.5 mb.
What's going on here? Why is it also necessary to "delete the file that stores cookies in your Firefox profile folder" sometimes? I mean, why were those sites there if the table was supposed to be empty and no cookies could be found by Firefox?
Chosen solution
When you delete data, I think the database engine clears an index or resets a row pointer and doens't overwrite the previously saved data So when you look at the raw data, you see the content of rows that Firefox no longer sees.
SQLite has a "vacuum" function to compact the database file and flush away stray bits, but there's no built-in feature in Firefox to trigger it.
Read this answer in context 👍 0All Replies (3)
Database programs often preallocate disk space in large chunks and do not surrender it back to the OS when you delete a few items. I'm not aware of any built-in function of Firefox to slim the database on demand, although some database maintenance may occur in the background from time to time. If you want to free some space, you can delete the file yourself (when Firefox is closed).
Thank you for your reply, jscher2000!
I can perfectly understand the preallocation done by the database, but my question is not why the database has a bunch of null entries, but why is it recorded in the database file many sites (e.g. "economist.com Ì???'???economist.com Ì???'???economist.com Ì???'??? ") that I cannot access in the database.
To be clearer: when I open the cookies.sqlite with Notepad++ I can see many of such website entries (economist.com, ebay.com, etc.). But when I try to access the database using DB Browser For SQLite, the database doesn't show any record, it is empty (I think this is why Firefox can't show me any cookies, like I said in the original post).
Why are these website entries there in the file but not in the database? Could this be some kind of malware exploit?
Suluhisho teule
When you delete data, I think the database engine clears an index or resets a row pointer and doens't overwrite the previously saved data So when you look at the raw data, you see the content of rows that Firefox no longer sees.
SQLite has a "vacuum" function to compact the database file and flush away stray bits, but there's no built-in feature in Firefox to trigger it.