Skip to content

Instantly share code, notes, and snippets.

@gavinr
Last active June 27, 2020 02:23
Show Gist options
  • Save gavinr/ef7add47b707ded9e61cf21e1cb242ce to your computer and use it in GitHub Desktop.
Save gavinr/ef7add47b707ded9e61cf21e1cb242ce to your computer and use it in GitHub Desktop.
place this in `C:\Users\zzzzzzz\AppData\Roaming\Mozilla\Firefox\Profiles\xxxxxxx\user.js` -- more info http://kb.mozillazine.org/User.js_file
// Most of these from https://restoreprivacy.com/firefox-privacy/ -
user_pref("media.peerconnection.enabled", false); // block WebRTC
user_pref("privacy.resistFingerprinting", true); // help to make Firefox more resistant to browser fingerprinting
user_pref("privacy.trackingprotection.fingerprinting.enabled", true); // [try to] block fingerprinting
user_pref("privacy.trackingprotection.cryptomining.enabled", true); // block cryptominers
user_pref("privacy.trackingprotection.enabled", true); // enable Mozilla’s built-in tracking protection feature
user_pref("privacy.firstparty.isolate", true); // isolate cookies to the first party domain, which prevents tracking across multiple domains
user_pref("network.cookie.cookieBehavior", 1); // Only accept cookies from the originating site (block third-party cookies)
user_pref("network.cookie.lifetimePolicy", 3); // set cookies to only last after N days [below]
user_pref("network.cookie.lifetime.days", 7);
user_pref("beacon.enabled", false);
user_pref("network.http.sendRefererHeader", 0); // never send "referer" header - this is how websites track where you're coming from when you land on their site.
// turn off all telemetry (reporting back to Mozilla what you do with Firefox):
user_pref("browser.newtabpage.activity-stream.feeds.telemetry", false);
user_pref("browser.newtabpage.activity-stream.telemetry", false);
user_pref("browser.ping-centre.telemetry", false);
user_pref("toolkit.telemetry.archive.enabled", false);
user_pref("toolkit.telemetry.bhrPing.enabled", false);
user_pref("toolkit.telemetry.enabled", false);
user_pref("toolkit.telemetry.firstShutdownPing.enabled", false);
user_pref("toolkit.telemetry.hybridContent.enabled", false);
user_pref("toolkit.telemetry.newProfilePing.enabled", false);
user_pref("toolkit.telemetry.reportingpolicy.firstRun", false);
user_pref("toolkit.telemetry.server", false);
user_pref("toolkit.telemetry.shutdownPingSender.enabled", false);
user_pref("toolkit.telemetry.unified", false);
user_pref("toolkit.telemetry.updatePing.enabled", false);
user_pref("webgl.enable-debug-renderer-info", false); // block broadcasting of your video card to prevent browser fingerprinting
user_pref("general.useragent.overridepreference", "Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Firefox/52.0"); // https://www.reddit.com/r/firefox/comments/e25wfe/firefox_72_will_block_fingerprinters_by_default/
// Fonts
// https://bugzilla.mozilla.org/show_bug.cgi?id=1336208
// https://bugzilla.mozilla.org/show_bug.cgi?id=1121643
user_pref("font.system.whitelist", "Arial, Cambria Math, Courier, Courier New, Georgia, Helvetica, Lucida Console, MS Gothic, MS PGothic, MS Sans Serif, MS Serif, Segoe UI, Tahoma, Times, Times New Roman, Verdana, Wingdings 2, Wingdings 3");
// This is not a "privacy" one - if you use a password manager like 1Password you want this set
// to allow that to handle password saving instead of Firefox:
user_pref("signon.rememberSignons", false);
// This is not a "privacy" one - if you want to hide the "save to pocket" link in the right-click menu:
user_pref("extensions.pocket.enabled", false);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment