9

How to remove User-Agent for Firefox

The goal is to remove this header from all web requests, in case you don't want sites to know which OS are you using.

fixer1234
  • 27,064
  • 61
  • 75
  • 116
VasyaNovikov
  • 3,366
  • 3
  • 25
  • 33

3 Answers3

13

There is a way to do this without any addons:

  • enter "about:config" into the URL bar. Press Enter.
  • create a new entry with key=general.useragent.override and an empty string as a value.
  • If you use an old version of Firefox, you also need to set the key general.useragent.enable_overrides to true.

This way your browrer will not send any "User Agent" at all. You can check this by doing:

  • open firefox network view with Ctrl Shift Q
  • load any URL you want
  • click on a web request and see the "Request Headers" on the right. There should be no "User-Agent" entry if you've done it right.

P.S. Your browser may still be leaked if you have JS enabled for a site. This is because each browser has its own rendering capabilities, supported formats etc. The described steps remove "User-Agent" request headers, that's all.

VasyaNovikov
  • 3,366
  • 3
  • 25
  • 33
  • The `general.useragent.enable_overrides` key is apparently no longer present in Firefox, but it seems that that step can be skipped without causing any problems. Also see this [HowToGeek tutorial](http://www.howtogeek.com/113439/how-to-change-your-browsers-user-agent-without-installing-any-extensions/?PageSpeed=noscript), which provides an illustrated version of your instructions. –  Nov 27 '15 at 02:22
  • @sampablokuper it seems you're right, that step is no longer required in the recent versions of Firefox. I've updated the solution. – VasyaNovikov Nov 27 '15 at 09:02
  • It works but a lot of websites stop working or work incorrectly when you do this. The most notable example is Facebook. – Radu Murzea Jan 31 '16 at 12:16
  • "work incorrectly" - I didn't see any such sites in practice. Maybe there are such, but supposedly rare. – VasyaNovikov Jan 31 '16 at 17:14
  • The fact that some sites stop working is really somewhat annoying. Still, it's they who want my personal data (like Facebook). Facebook banning empy UA is dual (symmetrical) to me avoiding UA-unfriendly sites. (Personally I'm principled, so if a site is not UA-friendly, I avoid such site.) – VasyaNovikov Jan 31 '16 at 17:16
  • works perfectly fine – fuat Jan 20 '22 at 21:45
0

I use an add-on for this, but only for specific websites that should treat me as a mobile device...

With Modify Headers you can try to fix your problem: https://addons.mozilla.org/de/firefox/addon/modify-headers/

MushyPeas
  • 101
  • 4
0

Note that it is still recommended to leave a minimum useragent string (e.g.: Mozilla/5.0), otherwise some sites (I won't give names) will totally block access...