MozillaZine

Are favicons stored in both their own file AND in bookmarks?

Discussion of general topics about Mozilla Firefox
Twelda
 
Posts: 13
Joined: September 20th, 2012, 11:02 am

Post Posted October 14th, 2019, 1:57 pm

Here's why I'm asking this question. Moments before writing this post I created a brand new Firefox profile as a test, and then looked at that profile's folder in Windows Explorer. The favicons.sqlite was 5120 KB in size. I then deleted the few stock bookmarks that come with a new profile, and then imported a bookmarks.html file consisting of 2000+ bookmarks that was exported just a moment earlier from my main profile.

I went back to the new profile in Windows Explorer and watched in real time as the favicons.sqlite file gradually grew to 14,080 KB in size. This confused me for 2 reasons: one, because the favicons.sqlite file from my main profile is only 10,848 KB in size, so this one was almost 50% larger, and two, because when I scanned through my bookmarks, only about 40-50% of the favicons were present (I did see the favicon for this website). I then closed Firefox, imported the smaller favicons.sqlite file from my main profile into this new profile, reopened Firefox, and saw all my favicons in my bookmarks.

This isn't a major thing, but I'd just like to understand - are there different kinds of favicons? Why did I see about half of them (or maybe I should ask why I saw *any* of them) just by importing the bookmarks.html file?

Thanks.

kerft
 
Posts: 553
Joined: January 30th, 2019, 9:38 am

Post Posted October 15th, 2019, 6:52 am

Bookmarks.html now is not a file used automatically by Firefox, places.sqlite and favicons.sqlite are. Bookmarks.html is only for backup, and export or import into other programs, and it does contain favicons. The similar compressed files <name>.json or <name>.jsonlz4 contain bookmarks, without any favicons.
I can't say why it did not import favicons for half of them. If you examine the bookmarks.html file with a text editor you may be able to see that some of the sites have favicons by the code that is near their name, some may not.

Also, sqlite files are allocated in chunks, even an empty file will often be for example 5 megabytes. This allows quicker use of the file, not having to resize it and possibly fragment it each time data is added. When 5 is not enough, it is increased all at once to 10. So the size of the file is not a perfect indicator of how much data it contains.

Brummelchen
 
Posts: 4616
Joined: March 19th, 2005, 10:51 am

Post Posted October 15th, 2019, 10:27 am

bookmarks.html contains icon data, ofc. but thats a combination of places and favorite (sqlite) which will be stored again separated as before.
the magic number is 51 and you are probably part of it :p

Return to Firefox General


Who is online

Users browsing this forum: No registered users and 3 guests