Why changing permissions in permissions.sqlite doesn't affect Firefox
This question is related to the preferences that are stored in permissions.sqlite database in Firefox. I am trying to stop Firefox from automatically loading images for websites.
If I disable the image auto loading feature through browser (Edit->Preferences->Content) for a website, firefox successfully stop automatically loading images for that site. And a new entry is also inserted into the "moz_hosts" table with permission "2" (Block).
However, if I change that permission back to "1" (Allow) through the "SQLite Manager" extension, firefox still won't be able to load images after a refresh.
My question is why I cannot change the image auto loading preference by directly editing the permissions.sqlite database. Really appreciate your help!
-Dongpu
Todas las respuestas (4)
Did you exit and restart Firefox to see whether the preference is saved or is overwritten?
If you start a new session, change permissions in the for a site not yet visited in that session, then visit the site, does Firefox apply the change?
I don't think Firefox re-reads the database in real time, but I don't know how long site permissions are retained in memory before they are re-read. It's possible that loading the permissions dialog triggers a database re-read. I think you'll have to experiment a bit. Or check out the source code.
Thanks! That works. Once I restarted, firefox successfully re-reads the new information from the database.
I do have a follow-up question for you. As you said, firefox has to be restarted in order to re-read the database, but I am wondering why there are some other preferences that can change firefox's behavior right after I edit it, without a restart. For instance, if I go to options->Tabs and check "Always show the tab bar" option, firefox will show the tab bar immediately.
Put another way, my question is why some preference can take effect on-the-fly but others require a restart in firefox?
Thanks! -Dongpu
Changes made through the user interface are cached, so Firefox is aware of those immediately. Changes made to files in the profile folder might not be re-read, and in fact might be overwritten when Firefox commits preferences to disk during shutdown.
That makes sense. User usually expect to see immediate behavior changes through editing the preference user interface, so those preferences need to take effect right away. The majority of the preferences, which are hidden from users, may require a firefox restart.
Modificadas por jindongpu el