In firefox you can access a config by typing about:config into the adress bar. In this config how do you alter your useragent?
You have to add an entry.
If you want to reset this value
If you want an easier way to change/toggle user agent I suggest you use an addon.