Current Version plugins

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

firefox custom user agent

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:

  1. 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.
  2. 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:

  1. Type about:config in the Firefox address bar and hit enter.
  2. You may receive a warning prompt, accept it to continue.
  3. Search for the preference general.useragent.override.
  4. It does not exist by default, so right-click on the page and select New > String from the context menu.
  5. Name it general.useragent.override.
  6. 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)

Ghacks needs you. You can find out how to support us here or support the site directly by becoming a Patreon. Thank you for being a Ghacks reader.

The post Firefox 47: Tab-based temporary user agent switching appeared first on gHacks Technology News.


Leave a Comment

Your email address will not be published. Required fields are marked *

Menu Title