• Useragent spoofing in Firefox and Waterfox

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

    Author
    Topic
    #2269199

    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!

    Dell XPS 13/9310, i5-1135G7/16GB, KDE Neon 6.2
    XPG Xenia 15, i7-9750H/32GB & GTX1660ti, Kubuntu 24.04
    Acer Swift Go 14, i5-1335U/16GB, Kubuntu 24.04 (and Win 11)

    5 users thanked author for this post.
    Viewing 0 reply threads
    Author
    Replies
    • #2269208

      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?

      Ex-Windows user (Win. 98, XP, 7); since mid-2017 using also macOS. Presently on Monterey 12.15 & sometimes running also Linux (Mint).

      MacBook Pro circa mid-2015, 15" display, with 16GB 1600 GHz DDR3 RAM, 1 TB SSD, a Haswell architecture Intel CPU with 4 Cores and 8 Threads model i7-4870HQ @ 2.50GHz.
      Intel Iris Pro GPU with Built-in Bus, VRAM 1.5 GB, Display 2880 x 1800 Retina, 24-Bit color.
      macOS Monterey; browsers: Waterfox "Current", Vivaldi and (now and then) Chrome; security apps. Intego AV

    Viewing 0 reply threads
    Reply To: Useragent spoofing in Firefox and Waterfox

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

    Your information: