Using Firefox user.js settings file

收藏待读

Using Firefox user.js settings file

The Firefox user.js file stores user settings, the file is loaded each time Firefox starts. This a convenient way to save your browser customizations and apply them on different machines.

The prefs.js file already exists in your Firefox profile directory, find the location using about:support in the top bar. The prefs.js file looks like it could be portable, but it contains too many settings, including paths and system specific items. It would not work across different platforms or users.

Note:Settings made in about:config are saved only to prefs.js. It is best not to make changes there but to manually enter them in the user.js file.

Example

I recently learned from a friend how to disable printing headers/footer on Firefox , thank you! I completely agree the default should be to not include them.

So in my user.js file I added:

// Printer Settings Default off
user_pref("print.print_footerleft", "");
user_pref("print.print_footerright", "");
user_pref("print.print_headerleft", "");
user_pref("print.print_headerright", "");

Now each time Firefox loads it will set those preferences.

Additional Settings

You can also use the user.js file for any settings in your Firefox config. This makes a nice way to set all your defaults such as privacy protection, do not track headers, and other items you might have to click through the Preferences menu.

See this pyllyukko/user.js repository for a very large list of potential settings to change for security and privacy. This list is a little too aggressive for me, so I don』t use it as-is. Each item is clearly explained so you can choose what settings to use in your file.

Summary

about:support
user_pref( setting, value );

相關閱讀

免责声明:本文内容来源于mkaz.blog,已注明原文出处和链接,文章观点不代表立场,如若侵犯到您的权益,或涉不实谣言,敬请向我们提出检举。