搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Why changing permissions in permissions.sqlite doesn't affect Firefox

  • 4 个回答
  • 1 人有此问题
  • 3 次查看
  • 最后回复者为 jindongpu

more options

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

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

所有回复 (4)

more options

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.

more options

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

more options

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.

more options

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.

由jindongpu于修改