Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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 수정일시