Refreshing Firefox favicons

Posted on: 2023-07-05
Tags:
  • Webdev

Refreshing Firefox favicons

If you are a web developer, you're gonna need this. 😎

For now, I have only tried this on Windows. Maybe I'll add more info later.

TLDR

Where are the favicons?

Inside the C:\Users\user1\AppData\Roaming\Mozilla\Firefox\Profiles\ folder, it looks like something like this

abcdef.default-release/
ghijkl.dev-edition-default/
mnopqr.default/

And inside these folders, you'll find:

./abcdef.default-release/favicons.sqlite
./abcdef.default-release/favicons.sqlite-shm
./abcdef.default-release/favicons.sqlite-wal
./ghijkl.dev-edition-default/favicons.sqlite
./ghijkl.dev-edition-default/favicons.sqlite-shm
./ghijkl.dev-edition-default/favicons.sqlite-wal

In tree view:

.
+---abcdef.default-release
|   favicons.sqlite
|   favicons.sqlite-shm
|   favicons.sqlite-wal
|
\---ghijkl.dev-edition-default
    favicons.sqlite
    favicons.sqlite-shm
    favicons.sqlite-wal

Running the file command (from git-bash) on these files show:

cd ghijkl.dev-edition-default/
file favicons.sqlite*

(At least on my machine) LOL

favicons.sqlite:     SQLite 3.x database, last written using SQLite version 3041002, page size 32768, writer version 2, read version 2, file counter 4, database pages 8, cookie 0x6, schema 4, largest root page 8, UTF-8, vacuum mode 1, version-valid-for 4

favicons.sqlite-shm: data

favicons.sqlite-wal: empty

If you open the favicons.sqlite with something like SQLiteStudio, you see:

Opening favicons.sqlite with SQLiteStudio

So, basically:

  • favicons.sqlite is a sqlite database
  • favicons.sqlite-shm is a shared-memory File (see SQLite docs)
  • favicons.sqlite-wal is a write-ahead log (WAL) file (see SQLite docs)

Now, all you need to do is delete those 3 files. And Firefox will rebuild them for you.

  • favicons.sqlite
  • favicons.sqlite-shm
  • favicons.sqlite-wal

PKLJack

Personal blog by PKLJack

I learn, I build, I share