搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

详细了解

Useragent string to only identify the version of Firefox

  • 9 个回答
  • 5 人有此问题
  • 1 次查看
  • 最后回复者为 cor-el

more options

How can I have my useragent hold only the information identifying my browser as Firefox and it's version? I am aware of the addon that allows me to disguise myself with other browser's useragent, however that is not what I'm looking for specially since the settings reset with every session.

How can I have my useragent hold only the information identifying my browser as Firefox and it's version? I am aware of the addon that allows me to disguise myself with other browser's useragent, however that is not what I'm looking for specially since the settings reset with every session.

被采纳的解决方案

You can create a new string in about:config called general.useragent.override and set it to what you want to display. You will need to update this every time you update Firefox if you want it to show the correct Firefox version. You can create a new string by right-clicking in about: config and selecting New > String

Be aware that removing parts of the user string can cause some sites that rely on user agent sniffing to not display properly.

定位到答案原位置 👍 0

所有回复 (9)

more options

选择的解决方案

You can create a new string in about:config called general.useragent.override and set it to what you want to display. You will need to update this every time you update Firefox if you want it to show the correct Firefox version. You can create a new string by right-clicking in about: config and selecting New > String

Be aware that removing parts of the user string can cause some sites that rely on user agent sniffing to not display properly.

由TonyE于修改

more options

I see there was this option as well. But I really do not know the structure of useragent what exactly to write as the value. Would you suggest what to wrote for the values I want (i.e. this is Firefox, version x)?

more options

My recommendation is do not change the user agent string. Your user agent string is currently "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"

It does not divulge any private information.

more options

I don't want to reveal my OS. While the system details does say Windows 7, I use Ubuntu usually, and for reasons I don't want to divulge I don't want to reveal anything other than basic browser details.

So is "Firefox/4.o.1" enough or is the Mozilla part necessary.

more options

It is best to keep the Mozilla/5.0 part as some sites will search for that. Not including an OS can also cause some sites to stop working properly.

Personally I do not understand why you would not want to reveal the OS. It is not private information.

more options

Okay, thanks for the input, I learned some new stuff. Now last query; is there any variables I can use to replace the two parts so I don't need to update it on every upgrade?

more options

You will need to update it every time you update Firefox.

more options

You could set that pref in a user.js file, which Firefox reads last - every time Firefox is opened.

http://kb.mozillazine.org/User.js_file

more options

You need to change the minor or major Firefox version as you see on the top of the Help > About window after each update in the pref general.useragent.override if you set that pref general.useragent.override to a specific UA.

That pref will always override the full user agent and that is the only way to change the UA in Firefox 4 and later. Other methods are no longer supported.