"U; " in UA-string and about:config pref "general.useragent.security" are removed #firefox4

On Firefox 4.0 beta 2, User-agent is shortened as following:

  • Mozilla/5.0 (Windows; U; Windows NT 6.1; en; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8
  • Mozilla/5.0 (Windows; Windows NT 6.1; rv:2.0b2) Gecko/20100720 Firefox/4.0b2

On Windows, it will be more short : Mozilla/5.0 (Windows NT 6.1; rv:2.0b2) Gecko/2010???? Firefox/4.0b?, according to Bug581783

"U; " and "en; " are removed. "en; " describes localization information. "U; " describes security level of the browser.

value of the security level
UStrong security (Default)
the browser provides crypto support that is stronger than what the "international" builds of Netscape offered circa 1995.
IWeak security
NNo security

Do you know what the "international" builds of Netscape offered circa 1995?

relation to about:config pref

You can change User-Agent token with about:config. (Note: to replace total User-Agent string, modify general.useragent.override)

User-Agent token vs about:config pref
Token NameExampleabout:config pref
Security level(*)Ugeneral.useragent.security
Localization data(**)engeneral.useragent.locale
Extra data for firefoxFirefox/4.0b2general.useragent.extra.firefox
  • (*): Both User-Agent string and about:config pref is removed on Firefox 4.0b2
  • (**): User-Agent string is removed on Firefox 4.0b2, about:config pref is still used.

Note that pref "general.useragent.security" was also removed at Jul 02.

Why Configuration Mania's User-Agent setting does not work on Firefox 4.0b2 even if "Addons"->"Do Not check add-on compatibility" is checked?

An error was occurs whenever the dialog initialized. Following code on Configuration Mania (version 1.12.2010071001) throws NS_ERROR_UNEXPECTED since "general.useragent.security" does not exist on Firefox 4.0b2.

var mSecurity = prefBranch.getCharPref("general.useragent.security");

Fixed patch has been pushed on bitbucket's repository.

See also