Custom UserAgent String is a Firefox extension that lets you set a user-agent on a per-site basis
So, Mozilla removed the site specific user-agent override setting from Firefox 71. There is a workaround for this, which as mentioned in the previous article is to use a global user-agent. The main issue with the workaround is that the set user-agent is then used on every site that you visit in the Firefox web browser.
And while I did warn you there maybe some side effects, initially I didn't notice many except for YouTube reverting to an older design.Â A few days later, when I visited a banking website, I found that it displayed a message which read something like "Upgrade your browser to access the website". Occasionally, one or two websites simply didn't load at all. I ignored those because I thought it was a server issue, but my friends told me they could access the sites from their browser (also Firefox).
That's when it hit me, of course the user-agent setting is what's messing with other websites. Sure enough, disabling the setting ensured that these websites worked as they normally do. Ironic, isn't it? You set the option to access some websites, but it ends up breaking others.Â I was looking for a fix and there is literally only one option, to use a user-agent switcher extension.
After some research and testing (and looking for alternatives to existing add-ons), I came across one which let me use user-agents on a per-site basis. The extension is called Custom UserAgent String.Â It is written by the author of the User-Agent Switcher revived add-on (not to be confused with the one made by Alexander Schlarb). It's amazing how many add-ons have the same name.
Functionally, both add-ons from Liner are quite similar, but the User-Agent Switcher extension only allows you to set a global user agent, which is what we wanted to fix here. Custom UserAgent String however lets you set a user-agent on a per-site basis. Perfect and it's quite simple to use too.
How to use Custom UserAgent String
Install the extension, click on its icon and then on the Options button. This should take you to a settings screen.
Ignore section I and skip to section II, which is captioned "Predefined UserAgent Strings". It has two drop-down menus, one for selecting the browser and Operating system, and the other for selecting the browser's user-agent.
Click on the box listed under "Enter a desired URL". You will see that it has an asterisk symbol * in it. Delete it and type the address of the website that you want to set the user-agent for in the box.Â Here's the weird part: Typing a partial address in the URL box like ghacks.net or www.ghacks.net doesn't add the site correctly, i.e., it reverts to the asterisk (which makes it use the user-agent globally).
To avoid this, you must use the full address. For e.g https://www.ghacks.net/ will work.
Use the box below the setting that reads "Enter a custom UserAgent string or select one from the above list". This is where you can enter the custom user agents for specific websites. You can get the user agent from the drop-down menu mentioned above. Or, you can use your custom one (for older browser versions that maybe missing). Click on the + button on the right side to finish adding the site-specific user-agent; it should appear in the table at the end of the page.
Note: The custom string option is good for long term use, since even if the add-on hasn't been updated, you can still get the latest user agent from elsewhere and use it.
Let's look at another example:
Say you want to access Skype on the Web. The URL should be written like this https://web.skype.com/
The user-agent should be Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
There are 2 other things that the Custom UserAgent String table is useful for. The checkbox next to each site listed, toggles the user-agent to be used for the entire website (top-level domain) or only for the given address. Clicking the blank gray button at the right end of the table acts as a switch for enabling/disabling the user-agent.
You can disable the Custom UserAgent String add-on completely by clicking on the icon and hitting the power button.
This method works perfectly fine in Firefox 71. Which extension are you using for setting site-specific user-agents?
Can I use this addon to have a specified user agent for all websites and on a specific website have another user agent?
Currently I use User Agent Switcher and Manager https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/ but I can’t specify a user agent on a per site basis with this add on…
@Damien, you wrote,
“Can I use this addon to have a specified user agent for all websites and on a specific website have another user agent?”
There’s a Firefox extension which allows these combinations :
‘User-Agent Switcher’ at https://addons.mozilla.org/en-US/firefox/addon/uaswitcher/
This extension is, IMO, the best in its category. Powerful and easy to use, intuitive.
@ Ali Baba & his 47 extensions
In general, there are more ways to find out what browser someone is using, and one of them is highly frowned upon:
UA sniffing is a relict from “the dark ages of web development”. For more than a decade, any web developer should know, that it’s very rarely a good idea to use UA sniffing:
5 Reasons Why Browser Sniffing Stinks (2009) … just to name a few and there are many more reasons today.
â€¢ Definitely, there are better ways to allow a developer to easily tailor user’s experiences based on the actual capabilities of their browser, rather than depending on notoriously misleading UA strings.
â€¢ From a capable web developers POV it doesn’t matter what UA-String you are spoofing, they give a sh*t … !
Given these facts, would you please so kind and shed some light, why your recommended â€˜User-Agent Switcherâ€™ is “powerful” and under what circumstances? … and “easy to use, intuitive” for what?
“Given these facts [above mentioned], would you please so kind and shed some light, why your recommended â€˜User-Agent Switcherâ€™ is â€œpowerfulâ€ and under what circumstances? â€¦ and â€œeasy to use, intuitiveâ€ for what?”
I didn’t explicitly recommend using a User-Agent manager, but only that n that category I considered â€˜User-Agent Switcherâ€™ to be the best together with the fact that extension met @Damien’s quest.
I agree with you, from what you write, @99, that modifying one’s UA is not recommended and personally I’d never modify my UA systematically. Here I do so only for the very few sites I encounter that refuse Firefox, i.e. histography.io . â€˜User-Agent Switcherâ€™ allows this, that is a per-domain approach together with a global or not and random or not settings. I use only the per-domain feature because i do agree with your pertinent analysis of the implications of UA modification.
Once upon a time firefox had this function as standard within the browser.Seems to me that in built functions are now being turned into extensions.
>>> This method works perfectly fine in Firefox 71.
And this perfectly fine since Firefox 54
Navigate to this site:
Study it carefully!
Use your brain & once you got it dude, load a website and just press
Ctrl + Shift + M(or
Cmd + Opt + Mon macOS)
Eh VoilÃ , Monsieur
No more silly “Custom-User-Agent-Switcher” extension needed.
Can this be used to stop DuckDuckGo from plugging its Firefox browser plugins every time that I visit their search page, because that’s getting annoying lately and really I wish that Firefox had a No Default Search Engine option as well.
USE UBLOCK ORIGIN. HIS CAN BLOCK THE POP UP