Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Firefox saves user preferences to prefs.js when exit it, is this redundant?

  • 3 trả lời
  • 1 gặp vấn đề này
  • 10 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

I have a question regarding to why Firefox saves user preferences to prefs.js when exit it.

My observation is that Firefox saves changes immediately to prefs.js when users modify preferences either through Option (Windows)/Preferences (Mac, Linux) menu or directly through about:config page. Therefore, the prefs.js file should always in sync with the browser.

However, I notice that Firefox saves preferences to prefs.js in the end when I exit the browser. I am wondering if this feature is redundant since all preferences are in sync between prefs.js and browser? Or maybe some preferences are not saved immediately? If that is the case, how to identify those preferences that are not saved immediately?

Thanks in advance!

I have a question regarding to why Firefox saves user preferences to prefs.js when exit it. My observation is that Firefox saves changes immediately to prefs.js when users modify preferences either through Option (Windows)/Preferences (Mac, Linux) menu or directly through about:config page. Therefore, the prefs.js file should always in sync with the browser. However, I notice that Firefox saves preferences to prefs.js in the end when I exit the browser. I am wondering if this feature is redundant since all preferences are in sync between prefs.js and browser? Or maybe some preferences are not saved immediately? If that is the case, how to identify those preferences that are not saved immediately? Thanks in advance!

Tất cả các câu trả lời (3)

more options

You can make a copy of prefs.js before closing and compare the two files.

more options

Hi cor-el,

Thanks for your replay! I tried the method you suggested. First, I open Firefox and make a copy of prefs.js, namely, prefs.js.old. Then I exit firefox and "diff" prefs.js and prefs.js.old. It turns out that the two files are identical. It looks like writing to prefs.js when exiting Firefox seems not necessary, because prefs.js is always in sync with the browser. Do you know what is the purpose of writing to prefs.js when exiting Firefox? Thanks!

more options

It is possible that there are situations where there are some prefs that need to be changed and where the two files differ.
This can happen if you use Clear Recent History and Firefox wasn't able to complete that task.
Another possibility is to restart Firefox to complete the installation of add-ons and there are probably more cases.