Just put in pref.js where it belongs and works.
Example:
user_pref("general.useragent.override", "Mozilla/5.0 (Windows; U; WinNT5.1;
en-US; 0.8.1) Gecko/20010323");
note: you might take a look at bug report # 46029.
Darin Fisher wrote:
> Thu-Van Luu wrote:
>
> > Hi,
> > I see this pref defined in nsHTTPHandler::InitUserAgentComponent. But,
> > when I try to use it by putting it in user.js, it doesn't seem to work.
> > It looks like we failed the nsPref::CopyCharPref call because the pref
> > name wasn't in the hashtable.
> > Can someone else verify this for me and tell me why it's not in the hash
> >
> > table. I don't see where/when Mozilla actually reads the prefs from
> > user.js and put the values into the hashtable.
> > Appreciate any insight on this...
> > PS. I saw an earlier post that sys this works. But, it doesn't seem to
> > for me. I'm using Mozilla07 on FreeBSD machine.
> > Thanks,
> > Thu-Van.
> >
> >
> >
> prefs.js is the wrong place for this... you need to make the change in
> the installation files (i think). there should be a master prefs.js
> someplace.
>
> darin