Firefox 47: Tab-based temporary user agent switching
Firefox 47 ships with a new feature that enables you to change the user agent on individual tabs temporarily.
The feature, designed to help webmasters and designers test web resources using different user-agents, can be used by regular users of the browser as well in the same fashion.
While it is usually not necessary to change the user agent when accessing sites, some sites may provide access to different content based on the user agent of the connecting web browser.
Just recently, we have noticed that Google was delivering different content to users connecting with Microsoft Edge, and that switching the user agent over to Chrome or Internet Explorer, would change that.
Firefox 47: Tab-Based User-Agent switching
Mozilla added the new feature to Firefox 47's Web Developer Tools, or more precisely, the browser's responsive design tool which allows you to test the design of a website using different size presets.
To make use of it, do the following:
- Hit F12 to open Firefox's Developer Tools and click on the responsive design tool when the interface opens, or use the shortcut Ctrl-Shift-M directly instead.
- There you find listed options to modify the size of the browser window (by emulating it inside Firefox), and the new option to add and use a custom user agent.
The new feature ships without any presets which means that you need to add the user agent yourself. It is possible that Mozilla may change this before the feature lands in the browser as it is highly uncomfortable to use currently as entered user agents are not remembered either by the tool.
This means, basically, that you need to have a list of user agent strings ready for copying and pasting whenever you are about to use the tool.
The benefit of the new option, opposed to changing the user agent permanently in Firefox's advanced configuration or using an extension, is that it is temporary only and does not require third-party tools.
To change the user agent permanently in Firefox, do the following:
- Type about:config in the Firefox address bar and hit enter.
- You may receive a warning prompt, accept it to continue.
- Search for the preferenceÂ general.useragent.override.
- It does not exist by default, so right-click on the page and select New > String from the context menu.
- Name it general.useragent.override.
- Enter the full user agent as the value.
Both methods let you change the user agent, but they don't work well if you need to switch between different agents regularly. If that is the case, the best solution is to use a Firefox add-on such as User Agent Switcher which enables you to do that.
While you need to add user agents to it as well, it is a one-time operation and switching between agents is done with just a couple of clicks.
As things stand, Firefox 47 will be released on June 7, 2016 to the stable channel. (via SÃ¶ren Hentzschel)
I used to use UAControl + User-Agent JS Fixer to hide my real user agent from browser fingerprinting attempts, but I switched to Random Agent Spoofer because the latter is superior for that purpose if you don’t need to present different specific user agents on different websites (e.g. some websites block/change content based on user agent). Some related notes:
Thanks for the info. Good to know that RAS covers both headers + JS. I actually have RAS (it’s disabled), haven’t tried it for about 3 months (I might have to have another look). I have two options when it comes to fingerprinting (of course not allowing JS in the first place is step one, but for those that ever do, as a worst case scenario) – reduce entropy/UA=common, or randomize it and hide in the noise. I have come to the opinion that hiding in the noise is best.
And yes, there are so many elements that leak info. Which is why I found RAS (and I think the addon is great and the ideas fantastic) at the time (I will revisit it) still had issues/flaws (but could be worked around by disabling some things). It’s important not to “partially” spoof anything. Think of locales, date formats, time zones, screen res, language, platform, 32 vs 64 bit, OS. IMO, RAS hadn’t matured enough. I did limit it to just UA spoofing and just to the last 10 versions of FF(32bit) on Windows7. At the time, for just this, it seemed overkill. And I think, from memory, it didn’t have a whitelist for each specific spoof (UA, screen res, etc)
cyberfox has user agent switcher in the developer tools i used it few times
I’m super glad this is just a pissy little developer ‘feature’. Your treatment of this teeny change as a whole article topic Martin gives the impression it’s a feature applied to the top level UI. With that assumption I was all worried that Mozilla had caved into the idiot developers replicating the IE6 mess by only coding for the WebShit, or derivative, engines.
Can you imagine that? Mozilla includes a UA switcher in the browser’s primary UI? It would be like a giant ‘FAILURE’ badge slammed on the Firefox UI. Don’t worry me with articles like this Martin! :)