Some extensions are extremely simple: they don't save preferences
because they are used for is to toggle a setting already in Firefox's
configuration (per profile). I use the No-Javascript Add-on extension
and it adds nothing that can be seen in about:config. That's because
all it does is toggle the javascript.enabled setting to True or False, a
setting already within Firefox.
Firefox's user agent setting (to override the hardcoded default) is:
general.useragent.override
So the Agent Switcher merely has to change the value of that setting.
If the default (hardcoded) is not overridden then this setting need not
exist which means Agent Switcher would have to create the setting and
then define its value all of which is still definitions within Firefox.
http://www.howtogeek.com/113439/how-to-change-your-browsers-user-agent-without-installing-any-extensions/
Shows how if the override setting is not present that it must be defined
and then assigned a value to do the override (of the inbuilt default).
User Agent Switcher's source code is hosted over at GitHub:
https://github.com/chrispederick/user-agent-switcher/
Yes, somewhere your selection would be recorded so that when the web
browser is exited and later reloaded that the same preferences gets
reused. After using User Agent Switcher to change away from the default
UA string after exiting Firefox, have you checked what was the value for
general.useragent.override? Have you used User Agent Switcher to change
to a non-default UA string and with Firefox left running (don't exit
after the UA change) then checked your prefs.js file to see if this
setting got created?
Do you have the Java plug-in installed? I've seen reports that it wipes
the UA setting on exit so you get the default on next load of Firefox.
Have you looked in the extensions own folder under your profile?
<yourFirefoxProfileFolder>/<extensionID>
which is probably:
%appdata%\Mozilla\Firefox\Profiles\<yourProfile>
That is where you find your prefs.js file. The extensions that are
installed in my profile for Firefox are under here in an "extensions"
subfolder. However, for example, uBlock Origin stores its data under
the extensions-data subfolder in an SQLite file.
https://github.com/chrispederick/user-agent-switcher/blob/master/development/source/content_common/useragentswitcher/options/options.js
That indicates the extension's options (settings) are exported and
imported from a file named useragentswitcher.xml.
https://bugzilla.mozilla.org/show_bug.cgi?id=933959
I'm not an expert on the internals of Firefox. That bug looks to report
that Mozilla deliberately nullified use of general.useragent.override to
be substituted by general.useragent.override.<site> site-specific
preference. That is, someone there decided that it was not appropriate
to change the UA string for every site that you visit, only for the
sites where you want to lie about your user agent to a particular site.
Although the bug has status "won't be fixed", it looks like the setting
might come back. I'm not sure where they are going in that bug thread.
https://www.autoitscript.com/forum/topic/180973-simple-way-to-change-firefox-useragent/
That author wrote his article only a couple weeks ago. It modifies the
general.useragent.override setting that you see (if defined) in
about:config. Alas, the author does not mention his version of Firefox.
If the override setting is now ignored then it may not show getting
changed in prefs.js. Instead the add-on has to change the "User-Agent:"
HTTP header on outbound connects. If indeed Mozilla yanked the override
setting (and if it's not coming back as a global setting) then perhaps a
UA changer would have to modify the HTTP header during session
initiation with the target site. That means the setting in about:config
is worthless so no point in storing it there.