Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Firefox user.js privacy and optimization settings
/*
* Open profile dir - find in about:support or about:profiles
* Copy this file into your profile directory.
* Add changes to this file. Save file.
* Restart Firefox. Below overrides will be loaded.
* Close Firefox and open prefs.js to confirm changes merged there.
* NOTE: only non-default values will be saved to prefs.js
*
*/
/* Fingerprinting avoidance from Tor project
* This changes too much! Timezone is GMT which is annoying on some sites.
* Instead change below useragent/buildID etc below.
*/
user_pref("privacy.resistFingerprinting", false);
/* Fingerprinting avoidance by picking common OS / browser */
/* IMPORTANT: Change useragent (& buildID if <v64) to latest versions! Keep it current! */
/*
user_pref("general.useragent.override", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0");
//Since FF64 buildID is hard-coded - https://www.fxsitecompat.com/en-CA/docs/2018/navigator-buildid-now-returns-a-fixed-timestamp/
user_pref("general.buildID.override", "20181001000000");
user_pref("general.appversion.override", "5.0 (Windows)");
user_pref("general.oscpu.override", "Windows NT 10.0; Win64; x64");
user_pref("general.platform.override", "Win32");
*/
//user_pref("dom.maxHardwareConcurrency", 2);
/* Privacy Stuff.
* Source:
* https://www.privacytools.io/#about_config
* https://ffprofile.com/
*/
user_pref("media.eme.enabled", false);
user_pref("media.gmp-widevinecdm.enabled", false);
user_pref("network.cookie.cookieBehavior", 1);
//user_pref("network.http.referer.trimmingPolicy", 2);
user_pref("network.http.referer.trimmingPolicy", 0);
user_pref("beacon.enabled", false);
user_pref("browser.cache.offline.enable", false);
user_pref("browser.disableResetPrompt", true);
user_pref("browser.fixup.alternate.enabled", false);
user_pref("browser.newtab.preload", false);
user_pref("browser.newtabpage.activity-stream.disableSnippets", true);
user_pref("browser.newtabpage.activity-stream.enabled", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
user_pref("browser.newtabpage.activity-stream.feeds.section.topstories", false);
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.feeds.topsites", false);
user_pref("browser.newtabpage.activity-stream.migrationExpired", true);
user_pref("browser.newtabpage.activity-stream.prerender", false);
user_pref("browser.newtabpage.activity-stream.showSearch", false);
user_pref("browser.newtabpage.activity-stream.showTopSites", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
user_pref("browser.newtabpage.directory.source", "");
user_pref("browser.newtabpage.directory.ping", "");
user_pref("browser.newtabpage.enabled", false);
user_pref("browser.newtabpage.enhanced", false);
user_pref("browser.newtabpage.introShown", true);
//user_pref("browser.safebrowsing.appRepURL", "");
//user_pref("browser.safebrowsing.enabled", false);
//user_pref("browser.safebrowsing.malware.enabled", false);
//user_pref("browser.safebrowsing.phishing.enabled", false);
user_pref("browser.selfsupport.url", "");
user_pref("browser.send_pings", false);
user_pref("browser.shell.checkDefaultBrowser", false);
user_pref("browser.startup.homepage_override.mstone", "ignore");
user_pref("datareporting.healthreport.service.enabled", false);
user_pref("datareporting.healthreport.uploadEnabled", false);
user_pref("datareporting.policy.dataSubmissionEnabled", false);
user_pref("dom.battery.enabled", false);
user_pref("dom.enable_performance", false);
user_pref("dom.enable_resource_timing", false);
//user_pref("dom.event.clipboardevents.enabled", false);
user_pref("dom.webaudio.enabled", false);
user_pref("extensions.getAddons.cache.enabled", false);
user_pref("extensions.getAddons.showPane", false);
user_pref("extensions.greasemonkey.stats.optedin", false);
user_pref("extensions.greasemonkey.stats.url", "");
user_pref("extensions.webservice.discoverURL", "");
user_pref("geo.enabled", false);
user_pref("media.navigator.enabled", false);
user_pref("media.peerconnection.enabled", false);
user_pref("media.peerconnection.turn.disable", true);
user_pref("media.peerconnection.use_document_iceservers", false);
user_pref("media.peerconnection.video.enabled", false);
user_pref("media.peerconnection.identity.timeout", 1);
user_pref("media.video_stats.enabled", false);
user_pref("network.dns.disablePrefetch", true);
user_pref("network.IDN_show_punycode", true);
user_pref("network.prefetch-next", false);
user_pref("privacy.donottrackheader.enabled", true);
user_pref("privacy.donottrackheader.value", 1);
user_pref("security.ssl3.dhe_rsa_aes_128_sha", false);
user_pref("security.ssl3.dhe_rsa_aes_256_sha", false);
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.coverage.opt-out", true);
user_pref("toolkit.telemetry.server", "");
user_pref("webgl.disabled", true);
//https://www.reddit.com/r/firefox/comments/9eb9o2/firefox_has_the_privacy_option_to_mitigate_tls/
user_pref("security.ssl.disable_session_identifiers", true);
user_pref("media.autoplay.default", 5);
//https://mailarchive.ietf.org/arch/msg/doh/po6GCAJ52BAKuyL-dZiU91v6hLw
//https://wiki.mozilla.org/Trusted_Recursive_Resolver
//trr.mode 5 is no DOH. 2 is enable DOH. 3 is no failback to system dns (no dns leaks)
user_pref("network.trr.mode", 5);
user_pref("network.trr.default_provider_uri", "https://dns.quad9.net/dns-query");
user_pref("network.trr.uri", "https://dns.quad9.net/dns-query");
user_pref("network.trr.custom_uri", "https://dns.quad9.net/dns-query");
user_pref("network.trr.bootstrapAddress", "9.9.9.9");
user_pref("dom.netinfo.enabled", false); // [DEFAULT: true on Android]
user_pref("media.webspeech.synth.enabled", false);
user_pref("webgl.enable-debug-renderer-info", false);
user_pref("dom.w3c_pointer_events.enabled", false);
user_pref("view_source.wrap_long_lines", true);
/* disable pocket integration */
user_pref("extensions.pocket.enabled", false);
//user_pref("extensions.pocket.enabled", true);
user_pref("browser.toolbarbuttons.introduced.pocket-button", true);
/* Other customizations */
/* Fix tab width too small */
user_pref("browser.tabs.tabMinWidth", 100);
/* Change homepage */
user_pref("browser.startup.homepage", "https://startpage.com/");
/* Increase disk write timer to prevent SSD from dying
* Source: https://www.servethehome.com/firefox-is-eating-your-ssd-here-is-how-to-fix-it/
*/
user_pref("browser.sessionstore.interval", 120000);
/* Turn off Smooth Scroll */
user_pref("general.smoothScroll", false);
/* Turn off warning on about:config */
user_pref("general.warnOnAboutConfig", false);
/* disable onboarding junk */
user_pref("browser.onboarding.enabled", false);
/* limit offline data storage */
user_pref("browser.cache.offline.capacity", 40000);
user_pref("browser.cache.disk.capacity", 40000);
/* Disable option "Recommend extensions"
* Source: https://support.mozilla.org/en-US/kb/extension-recommendations
* Source: https://winaero.com/blog/disable-extension-recommendations-in-mozilla-firefox/
*/
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
// FF71
// 2608: disable WebIDE and ADB extension download
// [1] https://trac.torproject.org/projects/tor/ticket/16222
// [-] https://bugzilla.mozilla.org/1539462
user_pref("devtools.webide.enabled", false); // [DEFAULT: false FF70+]
user_pref("devtools.webide.autoinstallADBExtension", false); // [FF64+]
// 2731: enforce websites to ask to store data for offline use
// [1] https://support.mozilla.org/questions/1098540
// [2] https://bugzilla.mozilla.org/959985
// [-] https://bugzilla.mozilla.org/1574480
user_pref("offline-apps.allow_by_default", false);
// FF72
// 0105a: disable Activity Stream telemetry
// [-] https://bugzilla.mozilla.org/1597697
user_pref("browser.newtabpage.activity-stream.telemetry.ping.endpoint", "");
// 0330: disable Hybdrid Content telemetry
// [-] https://bugzilla.mozilla.org/1520491
user_pref("toolkit.telemetry.hybridContent.enabled", false); // [FF59+]
// 2720: enforce IndexedDB (IDB) as enabled
// IDB is required for extensions and Firefox internals (even before FF63 in [1])
// To control *website* IDB data, control allowing cookies and service workers, or use
// Temporary Containers. To mitigate *website* IDB, FPI helps (4001), and/or sanitize
// on close (Offline Website Data, see 2800) or on-demand (Ctrl-Shift-Del), or automatically
// via an extension. Note that IDB currently cannot be sanitized by host.
// [1] https://blog.mozilla.org/addons/2018/08/03/new-backend-for-storage-local-api/
// [-] https://bugzilla.mozilla.org/1488583
user_pref("dom.indexedDB.enabled", true); // [DEFAULT: true]
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
// FF83
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false); // [DEFAULT: true]
// Fix bug DOMException: The quota has been exceeded without any localStorage
// https://bugzilla.mozilla.org/show_bug.cgi?id=1683299
// Fixed in FF85
//user_pref("dom.storage.default_quota", 10240);
// FF88
user_pref("pdfjs.enableScripting", false); // [DEFAULT: true]
// FF89
// Compact mode workaround in Firefox
// https://support.mozilla.org/en-US/kb/compact-mode-workaround-firefox
user_pref("browser.compactmode.show", true); // [DEFAULT: false]
user_pref("media.autoplay.enabled", false);
// FF93?
//user_pref("browser.privatebrowsing.promoEnabled", false); // [DEFAULT: true]
//user_pref("browser.privatebrowsing.promoTitleEnabled", false); // [DEFAULT: true]
//user_pref("browser.contentblocking.report.hide_vpn_banner", true); // [DEFAULT: false]
//user_pref("browser.contentblocking.report.vpn.enabled", false); // [DEFAULT: true]
//user_pref("browser.newtabpage.activity-stream.asrouter.disable-captive-portal-vpn-promo", true); // [DEFAULT: true]
// FF94
user_pref("browser.privatebrowsing.vpnpromourl", "");
// FF93
user_pref("browser.urlbar.suggest.quicksuggest", false); // [DEFAULT: false]
user_pref("browser.urlbar.suggest.quicksuggest.sponsored", false); // [DEFAULT: false]
// Disable LockWise from reaching out to firefox servers (disables lockwise)
//user_pref("signon.management.page.breach-alerts.enabled", false); // [DEFAULT: true]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment