Site-specific UA -- is it working?

Based on info received here, I created a user.js (never had one before) 
so I could pass a different UA to one particular problem site. But I 
can't tell if it's working. Is there a way to confirm that the site's 
getting what I'm feeding it? Help | About just reports the standard UA.

I placed the file here:
C:\Users\(Windows 
Username)\AppData\Roaming\Mozilla\SeaMonkey\Profiles\(profilename).default\

And here's the content, did I get it right?

# Mozilla User Preferences

user_pref("general.useragent.override.viki.com", "Mozilla/5.0 (Windows 
NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");

Thanks.

-- 
War doesn't determine who's right, just who's left.
--
Paul B. Gallagher

0
Paul
9/5/2019 4:02:40 PM
mozilla.support.seamonkey 13193 articles. 0 followers. Post Follow

9 Replies
15 Views

Similar Articles

[PageSpeed] 40

On 9/5/2019 9:02 AM, Paul B. Gallagher wrote:
> Based on info received here, I created a user.js (never had one before) 
> so I could pass a different UA to one particular problem site. But I 
> can't tell if it's working. Is there a way to confirm that the site's 
> getting what I'm feeding it? Help | About just reports the standard UA.
> 
> I placed the file here:
> C:\Users\(Windows 
> Username)\AppData\Roaming\Mozilla\SeaMonkey\Profiles\(profilename).default\
> 
> And here's the content, did I get it right?
> 
> # Mozilla User Preferences
> 
> user_pref("general.useragent.override.viki.com", "Mozilla/5.0 (Windows 
> NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");
> 
> Thanks.
> 

1.  Go to the Web site of your concern.

2.  With the Web page for the site still in SeaMonkey's window, on the
SeaMonkey menu bar, select [Help > About SeaMonkey] or [Help >
Troubleshooting Information].

Either of those will display your current user agent string.

A more complicated method involves installing the "Live HTTP headers"
extension and capturing the headers sent (and also received) when you go
to the site.

-- 
David E. Ross
<http://www.rossde.com/>

Immigration authorities arrested 680 undocumented aliens in meat
processing facilities in Mississippi.  Employing someone who is not
legally in the U.S. is also illegal.  How many of the EMPLOYERS are
being criminally charged?  If none, why not?
0
David
9/5/2019 4:46:30 PM
On 9/5/19, Paul B. Gallagher wrote:
> Based on info received here, I created a user.js (never had one before)
> so I could pass a different UA to one particular problem site. But I
> can't tell if it's working. Is there a way to confirm that the site's
> getting what I'm feeding it? Help | About just reports the standard UA.

Easiest would be to find an addon that shows the http headers.
I remember using one ages ago but I have no idea if something like
that is available for seamonkey now :(

If you're _really_ desperate to know you can see if this works for sm:
C:\UTIL>type firefox-ssldecode.bat
set SSLKEYLOGFILE=C:\Users\Lee\AppData\Local\Temp\FF-SSLkeys.txt
start C:\"Program Files\Mozilla Firefox\Firefox.exe"

@rem wireshark:
@rem   edit / preferences
@rem   protocols / ssl
@rem     paste SSLKEYLOGFILE filename into SSL debug file entry

> I placed the file here:
> C:\Users\(Windows
> Username)\AppData\Roaming\Mozilla\SeaMonkey\Profiles\(profilename).default\
>
> And here's the content, did I get it right?
>
> # Mozilla User Preferences
>
> user_pref("general.useragent.override.viki.com", "Mozilla/5.0 (Windows
> NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");

looks good to me

I have this bit at the start of my user.js
// make it obvious when user.js is borked
// this needs to be at the top of user.js
user_pref("00_user.js.loaded", "user.js load failed");

and this at the very end
//    *** must be last ***
// make it obvious when user.js is borked
// this needs to be at the end of user.js
user_pref("00_user.js.loaded", "yes");

enter "about:config" in the url bar & check the value of
  00_user.js.loaded
to see if there was a problem loading user.js  (i tend to forget the
terminating ;)

Lee
0
Lee
9/5/2019 5:17:20 PM
David E. Ross wrote:
> On 9/5/2019 9:02 AM, Paul B. Gallagher wrote:
>> Based on info received here, I created a user.js (never had one before)
>> so I could pass a different UA to one particular problem site. But I
>> can't tell if it's working. Is there a way to confirm that the site's
>> getting what I'm feeding it? Help | About just reports the standard UA.
>>
>> I placed the file here:
>> C:\Users\(Windows
>> Username)\AppData\Roaming\Mozilla\SeaMonkey\Profiles\(profilename).default\
>>
>> And here's the content, did I get it right?
>>
>> # Mozilla User Preferences
>>
>> user_pref("general.useragent.override.viki.com", "Mozilla/5.0 (Windows
>> NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");
>>
>> Thanks.
>>
> 
> 1.  Go to the Web site of your concern.
> 
> 2.  With the Web page for the site still in SeaMonkey's window, on the
> SeaMonkey menu bar, select [Help > About SeaMonkey] or [Help >
> Troubleshooting Information].
> 
> Either of those will display your current user agent string.

As I said above, "Help | About just reports the standard UA." It reports 
the same UA no matter what site I'm visiting. Does that mean the user.js 
pref has no effect?

> A more complicated method involves installing the "Live HTTP headers"
> extension and capturing the headers sent (and also received) when you go
> to the site.

Hmmm....

-- 
War doesn't determine who's right, just who's left.
--
Paul B. Gallagher
0
Paul
9/5/2019 5:21:00 PM
On 9/5/19, Paul B. Gallagher <paulbg@pbgdashtranslations.com> wrote:
> David E. Ross wrote:
>> On 9/5/2019 9:02 AM, Paul B. Gallagher wrote:
>>> Based on info received here, I created a user.js (never had one before)
>>> so I could pass a different UA to one particular problem site. But I
>>> can't tell if it's working. Is there a way to confirm that the site's
>>> getting what I'm feeding it? Help | About just reports the standard UA.
>>>
>>> I placed the file here:
>>> C:\Users\(Windows
>>> Username)\AppData\Roaming\Mozilla\SeaMonkey\Profiles\(profilename).default\
>>>
>>> And here's the content, did I get it right?
>>>
>>> # Mozilla User Preferences
>>>
>>> user_pref("general.useragent.override.viki.com", "Mozilla/5.0 (Windows
>>> NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");
>>>
>>> Thanks.
>>>
>>
>> 1.  Go to the Web site of your concern.
>>
>> 2.  With the Web page for the site still in SeaMonkey's window, on the
>> SeaMonkey menu bar, select [Help > About SeaMonkey] or [Help >
>> Troubleshooting Information].
>>
>> Either of those will display your current user agent string.
>
> As I said above, "Help | About just reports the standard UA." It reports
> the same UA no matter what site I'm visiting. Does that mean the user.js
> pref has no effect?
>
>> A more complicated method involves installing the "Live HTTP headers"
>> extension and capturing the headers sent (and also received) when you go
>> to the site.
>
> Hmmm....

I have an old copy of "Live HTTP headers" if you want it.

I tried adding
user_pref("general.useragent.override.google.com", "Mozilla/5.0
(Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");

didn't change my user agent when visiting www.google.com, so added
user_pref("general.useragent.override.www.google.com", "Mozilla/5.0
(Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");

which did change the ua string for www.google.com but not any other
..google sites referenced by the main page :(

Maybe try to find a user agent switcher addon that will let you change
the advertised ua on the fly?

Lee
0
Lee
9/5/2019 8:05:42 PM
> On 9/5/2019 9:02 AM, Paul B. Gallagher wrote:
>> Based on info received here, I created a user.js (never had one before)
>> so I could pass a different UA to one particular problem site. But I
>> can't tell if it's working. Is there a way to confirm that the site's
>> getting what I'm feeding it? Help | About just reports the standard UA.
>>
>> I placed the file here:
>> C:\Users\(Windows
>> Username)\AppData\Roaming\Mozilla\SeaMonkey\Profiles\(profilename).default\

The part you've replaced with "(profilename)" is usually just random. 
The "default" part is typically what you see as the name in profile 
manager. If you've never created additional profiles there's probably 
only the one default directory there anyway, but just mentioning in case 
not.

>> And here's the content, did I get it right?
>>
>> # Mozilla User Preferences
>>
>> user_pref("general.useragent.override.viki.com", "Mozilla/5.0 (Windows
>> NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0");

As a quick check that you've correctly edited the correct file:
- From within SeaMonkey open <about:config> and accept the warning
- Type "override" in the search box at the top
- Does your override preference show up there?

Personally I don't usually bother with directly editing the prefs files, 
and just update them via about:config. There are pros and cons though, 
so whichever way you prefer is fine.

David E. Ross wrote:
> 1.  Go to the Web site of your concern.
> 
> 2.  With the Web page for the site still in SeaMonkey's window, on the
> SeaMonkey menu bar, select [Help > About SeaMonkey] or [Help >
> Troubleshooting Information].
> 
> Either of those will display your current user agent string.

I don't think that picks up site-specific overrides. Certainly for me, 
if I go to a site for which I know the override is working (otherwise 
the site doesn't render correctly), both of those still show my default UA.

> A more complicated method involves installing the "Live HTTP headers"
> extension and capturing the headers sent (and also received) when you go
> to the site.

There's not really any need for the extension any more, since similar 
functionality is built in:
- Go to Tools > Web Development > Toggle Tools; the tools open at the 
bottom of the window
- Select the "Network" tab
- Load (or reload) the target page (viki.com)
- Select the top request in the list on the left of the "Network" tab
- The request and response headers are listed on the "Headers" tab on 
the right
- Check the "User-Agent" request header; if your override works you 
should see that string (with no mention of SeaMonkey), otherwise you'll 
see the default one with the SeaMonkey version

-- 
Mark.

0
mozilla
9/5/2019 8:07:05 PM
mozilla-lists.mbourne@spamgourmet.com wrote:

> As a quick check that you've correctly edited the correct file:
> - From within SeaMonkey open <about:config> and accept the warning
> - Type "override" in the search box at the top
> - Does your override preference show up there?

Yep. But without the https protocol as noted.

> There's not really any need for the extension any more, since similar 
> functionality is built in:
> - Go to Tools > Web Development > Toggle Tools; the tools open at the 
> bottom of the window
> - Select the "Network" tab
> - Load (or reload) the target page (viki.com)
> - Select the top request in the list on the left of the "Network" tab
> - The request and response headers are listed on the "Headers" tab on 
> the right
> - Check the "User-Agent" request header; if your override works you 
> should see that string (with no mention of SeaMonkey), otherwise you'll 
> see the default one with the SeaMonkey version


I followed your steps, but I see no "Headers" tab on the right or 
anywhere else in the pane. The application is maximized, so there should 
be nothing off-screen.


-- 
War doesn't determine who's right, just who's left.
--
Paul B. Gallagher

0
Paul
9/5/2019 9:09:41 PM
On 9/5/19, Paul B. Gallagher <paulbg@pbgdashtranslations.com> wrote:
> mozilla-lists.mbourne@spamgourmet.com wrote:
>
>> As a quick check that you've correctly edited the correct file:
>> - From within SeaMonkey open <about:config> and accept the warning
>> - Type "override" in the search box at the top
>> - Does your override preference show up there?
>
> Yep. But without the https protocol as noted.
>
>> There's not really any need for the extension any more, since similar
>> functionality is built in:
>> - Go to Tools > Web Development > Toggle Tools; the tools open at the
>> bottom of the window
>> - Select the "Network" tab
>> - Load (or reload) the target page (viki.com)
>> - Select the top request in the list on the left of the "Network" tab
>> - The request and response headers are listed on the "Headers" tab on
>> the right
>> - Check the "User-Agent" request header; if your override works you
>> should see that string (with no mention of SeaMonkey), otherwise you'll
>> see the default one with the SeaMonkey version
>
>
> I followed your steps, but I see no "Headers" tab on the right or
> anywhere else in the pane. The application is maximized, so there should
> be nothing off-screen.

Click on one of those lines that starts off with '200  GET', over on
the right is a 'Raw headers' button, click on that and below it you
get a 'request headers' & 'response headers' panel

Lee
0
Lee
9/6/2019 1:24:33 AM
Lee wrote:
> On 9/5/19, Paul B. Gallagher <paulbg@pbgdashtranslations.com> wrote:
>> mozilla-lists.mbourne@spamgourmet.com wrote:
>>
>>> As a quick check that you've correctly edited the correct file:
>>> - From within SeaMonkey open <about:config> and accept the warning
>>> - Type "override" in the search box at the top
>>> - Does your override preference show up there?
>>
>> Yep. But without the https protocol as noted.
>>
>>> There's not really any need for the extension any more, since similar
>>> functionality is built in:
>>> - Go to Tools > Web Development > Toggle Tools; the tools open at the
>>> bottom of the window
>>> - Select the "Network" tab
>>> - Load (or reload) the target page (viki.com)
>>> - Select the top request in the list on the left of the "Network" tab
>>> - The request and response headers are listed on the "Headers" tab on
>>> the right
>>> - Check the "User-Agent" request header; if your override works you
>>> should see that string (with no mention of SeaMonkey), otherwise you'll
>>> see the default one with the SeaMonkey version
>>
>>
>> I followed your steps, but I see no "Headers" tab on the right or
>> anywhere else in the pane. The application is maximized, so there should
>> be nothing off-screen.
> 
> Click on one of those lines that starts off with '200  GET', over on
> the right is a 'Raw headers' button, click on that and below it you
> get a 'request headers' & 'response headers' panel

OK, I see what you mean. It turns out I'm not sending the site-specific 
UA; will try including the version with "www." and see if that helps.

-- 
War doesn't determine who's right, just who's left.
--
Paul B. Gallagher

0
Paul
9/6/2019 3:38:29 AM
Paul B. Gallagher wrote:
> Lee wrote:
>> On 9/5/19, Paul B. Gallagher <paulbg@pbgdashtranslations.com> wrote:
>>> mozilla-lists.mbourne@spamgourmet.com wrote:
>>>
>>>> As a quick check that you've correctly edited the correct file:
>>>> - From within SeaMonkey open <about:config> and accept the warning
>>>> - Type "override" in the search box at the top
>>>> - Does your override preference show up there?
>>>
>>> Yep. But without the https protocol as noted.
>>>
>>>> There's not really any need for the extension any more, since similar
>>>> functionality is built in:
>>>> - Go to Tools > Web Development > Toggle Tools; the tools open at the
>>>> bottom of the window
>>>> - Select the "Network" tab
>>>> - Load (or reload) the target page (viki.com)
>>>> - Select the top request in the list on the left of the "Network" tab
>>>> - The request and response headers are listed on the "Headers" tab on
>>>> the right
>>>> - Check the "User-Agent" request header; if your override works you
>>>> should see that string (with no mention of SeaMonkey), otherwise you'll
>>>> see the default one with the SeaMonkey version
>>>
>>>
>>> I followed your steps, but I see no "Headers" tab on the right or
>>> anywhere else in the pane. The application is maximized, so there should
>>> be nothing off-screen.
>>
>> Click on one of those lines that starts off with '200  GET', over on
>> the right is a 'Raw headers' button, click on that and below it you
>> get a 'request headers' & 'response headers' panel
> 
> OK, I see what you mean. It turns out I'm not sending the site-specific 
> UA; will try including the version with "www." and see if that helps.

OK, that did it, now I can see that I am sending the modified UA as 
intended. Thanks.


-- 
War doesn't determine who's right, just who's left.
--
Paul B. Gallagher

0
Paul
9/6/2019 3:44:20 AM
Reply: