News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • Useragent spoofing in Firefox and Waterfox

    Posted on Ascaris Comment on the AskWoody Lounge

    Home Forums AskWoody support Questions: Browsers and desktop software Other browsers Useragent spoofing in Firefox and Waterfox

    • This topic has 1 reply, 2 voices, and was last updated 1 month ago.
    Viewing 1 reply thread
    • Author
      Posts
      • #2269199 Reply
        Ascaris
        AskWoody_MVP

        It’s been considered bad practice for decades, but some web sites still insist on a practice called useragent sniffing to decide which content you should receive, and even if you are allowed to use the site, in some cases.  If your browser is Chrome and you use Windows, you probably won’t have any issues, but if you use Firefox or Waterfox and/or Linux, you may at some point run into a site that harasses you or just plain blocks access. Banks are a particular offender in this way.

        A useragent string is just a little blurb of text that a browser will send along with HTTP/HTTPS requests that is meant to identify the client application in use (the user agent).  It looks something like this:

        Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0 Waterfox/56.3

        The details in the string will, of course, change, but they all look more or less like that.

        Which browser you use is your choice, and if a site requires a given browser feature to work properly (generally considered bad practice, as a site should degrade gracefully to allow “lesser” browsers to work), it should detect the feature in question, not just sniff the useragent and decide you are not welcome.

        Fortunately, a useragent string is easily spoofed.  You can have the browser claim to be anything you want it to.  If a web site needs some actual feature in Chrome to work, it should detect that feature, or lack thereof, and act based on that, but if all if wants is a little string of text that says, “Yes, I’m a Windows PC running Chrome,” by all means, they can have that with a minimum of fuss.

        I use an extension known as User-Agent Switcher and Manager, available from the Firefox extension site.  It will install and work from that site in Waterfox just as well as with Firefox.

        Once installed, you should see the little icon on the right of the URL bar.  In Waterfox, you can move it to the addon bar or the status bar (if you have Status-4-Evar) if you prefer.  To use it, simply click the icon, and a popup menu will appear, giving the choice of many different browsers and operating systems you can claim to be.  Here’s a screenshot:

        ua

        You can select a new OS and browser from each of the dropdowns.  In the field at the bottom of the popup, you can see the actual useragent in use at the moment. Once you have found a new one you like, press Apply and that useragent will be used from then on, until you reset it yourself, or until you close the browser.

        If you’d rather not use an addon, you can use about:config in Firefox or Waterfox to change the useragent for all sites, or on a site-by-site basis.  Simply enter about:config into the URL bar, hit enter, then search for ‘useragent’, and if you want to set useragents for specific sites, look for this pref:

        general.useragent.site_specific_overrides

        and set it to true.

        Then, you can right click and create a new pref (type “string”), and for the name, enter ‘general.useragent.override.’ and the site you want to override right after that. If you want to override the default useragent string on Netflix, you would create a pref named:

        general.useragent.override.netflix.com

        and in the pref itself, the next field that will appear after you select the name, paste the string you want it to use.  If you want Waterfox to pretend to be Firefox (which is necessary for Waterfox to work with Netflix), you could use this useragent:

        Mozilla/5.0 (X11; Linux x86_64; rv:75.0) Gecko/20100101 Firefox/75.0

        That would tell Netflix that you’re using Firefox 75 on Linux.  You could also claim to be using Windows, if that is your wish, or another version of Firefox.

        Until the practice of useragent sniffing is finally put to rest, we have a number of ways to handle it. If the site does require a specific feature in Chrome or another browser, spoofing the useragent won’t suddenly make that feature appear, of course. That’s not usually the case, though.  Usually, other browsers will work fine, if the site would just stop being nosy and picky.  That’s when useragent switchers are at their most useful!

        Group "L" (KDE Neon User Edition 5.19.2).

        Attachments:
        5 users thanked author for this post.
      • #2269208 Reply
        OscarCP
        AskWoody Plus

        Ascaris: Thanks.

        One small clarification: for the last two months or so, I have been able to access and download video from Netflix without any problems using Waterfox.  I have the “classic” version in my Mac and I try to keep it always up to date; that might have something to do with it.

        The only important site of those few where a red-lettered warning that “I am not using an approved browser” invariably comes up if I try to log in with Waterfox, is my bank. Chrome is OK there, but I am not entirely comfortable using it to check my accounts, move money around, etc. with Google perching on my shoulder. Maybe that’s just me?

        Windows 7 Professional, SP1, x64 Group W (ex B) & macOS + Linux (Mint)

    Viewing 1 reply thread

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: Useragent spoofing in Firefox and Waterfox

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.