DEV Community

Cover image for Don't be tracked ⚙️ Tweak the Firefox configurations
Pierre-Henry Soria ✨
Pierre-Henry Soria ✨

Posted on • Updated on

Don't be tracked ⚙️ Tweak the Firefox configurations

Firefox has the advantage of being the most tweakable and customizable browser currently available.

If you care about your privacy, below are 15 configuration changes you should do to your Firefox desktop in order to not be tracked anymore.

Firstly, type in Firefox's address bar, about:config, then follow the above steps ⬇

1. Search media.peerconnection.enabled and set to false

When set to TRUE, it allows using WebRTC technology for real-time communications such as video chat and audio.

Sadly there is a flaw that is leaking your real unique IP address through browser STUN requests, even if you are using a VPN service.
That's why it is a wise decision to disable this option, unlike you use a website that requires WebRTC.

2. Set privacy.resistFingerprinting to true which makes Firefox more resistant to browser fingerprinting. It prevents sharing technical information about your Web browser, IP, operating system details, etc.

3. Set geo.enabled to false to disable geolocation tracking.

As explained on the Mozilla website, when geolocation is accepted by the user, Firefox uses Google Location Services to determine your location by sending to Google:

  • Your computer's IP address.
  • Information about the nearby wireless access points.
  • A random client identifier, which is assigned by Google, that expires every 2 weeks.

4. Set network.cookie.lifetimePolicy to 2

The value should be 2, which keeps the websites' cookies for the current session only. They will be automatically deleted at the end of the session.

The other possible values are:

0 = Accept cookies normally
1 = Prompt for each cookie
2 = Accept for current session only
3 = Accept for N days

5. Set privacy.firstparty.isolate to true, which isolates the cookies to the first party domain and prevent them to be used across multiple domains.

6. Set network.cookie.cookieBehavior to 1

The best value here is 1 which only accepts cookies from the originating site (block third-party cookies).

The other possible values are:

0 = Accept all cookies by default
1 = Only accept from the originating site (block third-party cookies)
2 = Block all cookies by default
3 = Block cookies from unvisited sites
4 = New Cookie Jar policy (prevent storage access to trackers)

7. Set network.dns.disablePrefetch to true

Although it may slightly slower page load speeds, disabling domain name resolution will protect you from privacy and security threats.

8. Set webgl.disabled to true will prevent your device to be fingerprinted and any potential security risks from using WebGL.

9. Set dom.event.clipboardevents.enabled to false

With this option disabled, websites won't know if you copy/paste something from their web page and which part of the page had been selected.

10. Set dom.battery.enabled to false

It prevents websites from knowing whether you are using your laptop on battery or AC power.

11. Set browser.urlbar.speculativeConnect.enable to false

It disables the preloading of autocomplete URLs. Firefox preloads URLs that autocomplete when a user types into the address bar.

12. Set browser.cache.offline.enable to false if you don't use the offline mode.

If TRUE, it allows websites to store data on your computer for when you would be offline.

13. Set media.navigator.enabled to false in order to prevent websites from knowing if a microphone or a video camera is available on your device.

14. Set network.prefetch-next to false prevents web pages from being prefetched by Firefox.

Mozilla has deployed this option to improve page load speeds. However, it will pose a risk to privacy. That's why it's wiser to keep this option disabled.

15. Set network.ttr.mode to2

Mozilla plans to use DNS-over-HTTPS (DoH) by default, however, for most of us, it isn't enabled by default.

Performing remote Domain Name System (DNS) resolution via HTTPS protocol prevents your ISP and network administrators to know the URLs you visit.

The other possible values fornetwork.ttr.mode are:

0 = Default value in standard Firefox installations (currently is 5, which means DoH is disabled)
1 = DoH is enabled, but Firefox picks if it uses DoH or regular DNS based on which returns faster query responses
2 = DoH is enabled, and regular DNS works as a backup
3 = DoH is enabled, and regular DNS is disabled
5 = DoH is disabled

That's all! 😌

Hopefully, you will now enjoy your privacy rights.

I would be happy to hear from you, any feedback or suggestion.

Top comments (0)