User Agent Switcher and Manager Spoofs and mimics browser's User-Agent strings
Support Development
PayPal ● 
Bitcoin Address: bc1qh7juzrxrawpr65elm4qs285m5rdhnhgsn7h2jf
 ● 
Lightning Address: bhjmq@getalby.com
Your Input Matters
Review
Advertisement
Screenshot
The "User-Agent Switcher and Manager" extension allows you to alter your browser's User-Agent string, which is used by web servers to provide content to you. Based on your browser type and operating system, web servers may provide different HTML content (such as a different styling or lower resolution images) or the JavaScript engine may operate differently. By altering your browser's User-Agent string with this extension, you can get the content intended for a different device, such as mobile content instead of desktop content for faster and lighter web browsing.

Features

FAQs

  1. What is "User-Agent Switcher" extension and how does it work?

    This extension when activated performs two actions: 1) It overwrites the navigator.userAgent string to return a custom string provided by the user. 2) It alters the "User-Agent" header that is sent with each request. The former method is used in JavaScript libraries to detect user's browser type and operating system. The latter one is used by web servers to detect these two parameters. When the extension is active, both of these approaches are applied to prevent the actual "User-Agent" string from leaking.

    Note: When the extension is not active (disabled from the toolbar popup by pressing the "Reset" button), there is no network monitor and hence extension does not use any resource.

    Note: This extension only alters "User-Agent" string for "HTTP://", "HTTPS://" and "FTP://" schemes. So locally loaded HTML pages with "FILE://" scheme can pass the extension's protective script and will display your actual "User-Agent" string (there is no security or privacy concern as this type of pages cannot send any request to an actual web server).

  2. What's new in this version?

    Please check the Logs section.

  3. How can I set a custom or pre-defined "User-Agent" string?

    After installing the extension, a toolbar button is added to your browser. Simply open the popup by pressing the toolbar button. Wait until all "User-Agent" strings are loaded (this may take a few seconds). You can filter the strings by "Browser" type or by "Operating System". Also, you can use the "custom" filtering box to find matching strings. When a "User-Agent" string is selected from the list, it will be inserted in the provided text-box where you can edit its content. When the content looks good, press the "Apply" button.

  4. Sometimes, new versions of the "User-Agent" strings for a particular browser is not on the list. Can I manually set it?

    Yes, simply paste the string in the provided text box in the popup and press the "Apply" button.

  5. How can I reset the "User-Agent" string back to the default one?

    Open the toolbar popup and press the reset button. You will notice the color of the toolbar will change. Also, the tooltip is tagged with the "disabled" label.

  6. What is my current "User-Agent" string?

    To find the currently used "User-Agent" string hover your mouse pointer over the toolbar button. The string and enable or disable status is displayed in the tooltip.

  7. Although the extension is active, still in the incognito mode, my actual "User-Agent" string is displayed. How can I fix this?

    Go to the extension manager and allow this extension to work on the incognito mode.

  8. Can I apply user-agent string spoofing only for certain domains?

    As of version 0.1.3, it is possible to have "white-list", "black-list", or "custom" modes of operation. In the "black-list" mode, the custom user-agent string is set for all tabs except the ones that are listed on the options page. In the "white-list" mode, however, the user-agent string is only set for those tabs that their hostname matches with one of the hostnames listed in the options page. In the "custom" mode, user-agent string is resolved from the user-defined JSON object. If there is a key in the JSON object with the hostname, then user-agent will be the value of this key, otherwise, the user-agent string will be the default user-agent string of your browser or the one that is set from the toolbar popup.

  9. What is the meaning of the "custom" mode and how can I use it?

    In the custom mode, the extension uses user-defined JSON object to match user-agent strings. If the provided JSON object has a key that is equal to the top-level hostname (e.g.: www.google.com), the value of that key is used as the user-agent string for all the requested originated from this hostname. If no key is found, the extension ignores the tab which means the default user-agent string or the one that is set in the popup is used.

    To have a random user-agent string, provide an array of user-agent strings instead of a single one

    Use "*" to match all hostnames

    {
      "www.google.com": "useragent-string-1",
      "www.bing.com": "useragent-string-2",
      "www.example.com": [
        "random-useragent-string-1",
        "random-user-agent-string-2"
      ],
      "*": "useragent-string-for-all-hostnames"
    }
    Note that as of version 0.2.9, the user can define an array with "_" key which provides the list of all hostnames that are going to use a single random user-agent string for the current browser session. So if a hostname is defined in this list, then the extension randomly selects a user-agent string once and will use this random string until the browser restarts. If you need this behavior for all random arrays in your JSON object, then add "*" in your "_" array instead of the hostnames. See this example:
    {
      "www.example1.com": [
        "random-useragent-string-1",
        "random-user-agent-string-2"
      ],
      "www.example2.com": [
        "random-useragent-string-3",
        "random-user-agent-string-4"
      ],
      "_": ["www.example1.com", "www.example2.com"]
    }

  10. What is the meaning of the "window" button in the toolbar popup?

    As of version 0.2.4, you can define a user-agent string for the current window only. This means that all other browser windows will use the global setting except the current window. This may help you organize your work better. Note that you can have as many user-agent strings per-window as you want. To reset the window-based UA settings use the "Restart" button in the toolbar popup. This button basically restarts the extension and hence all the temporarily settings are wiped. So the window based settings is not a permanent setting (there is no way to find a window when a browser is restarted). It works until all the tabs in the window are closed or the extension gets reloaded. To differentiate the window with a defined user-agent string, this extension adds a badge notification to the toolbar area. For the users of black- and white-list modes, please read the options page to make sure how the black- and white-lists are affected by the newly introduced window-based user-agent string setting.

  11. Can I set the empty user-agent string?

    Use the "empty" keyword as the user-agent string since blank input is not a valid entry. The extension will use the empty string when this keyword is used.

  12. This extension doesn't seem to support wildcard matching. How can I set a user-agent string for both top domain and all its sub-domains?

    Wildcard matching is not a native method in JavaScript and it will reduce the extension performance. Instead, this extension supports the exact matching option. If this option is checked, you will need to insert all the sub-domains in the list for the matching to work. If the option is unchecked, the extension will automatically consider all sub-domains while matching is applied. For instance if google.com is in the white or black list then www.google.com will also be matched.

  13. Is there a way to easily switch between different modes (black-list, white-list, and custom modes)?

    Use the right-click context menu over the toolbar button to switch between different modes. For instance, if you use the custom mode, then to temporarily disabling the extension, switch to the default black-list mode.

  14. How can I know if the user-agent string of the current tab is set? What is the meaning of the toolbar icon colors?

    As of version 0.3.2, the toolbar uses 3 different colors. The gray color is used when the extension is entirely disabled. This means that no network observer is installed and the extension has no effect on the browser whatsoever. When it is colorful, then there is at least one observer on the network, either because there is a window with a custom user-agent or you are on the white/blacklist modes. When the color is orange, it means the current tab is using the user-agent string that is set from the toolbar popup. When the icon has a half blue color, it means the tab is being ignored and the default user-agent string is used (for all internal pages, pages that have not been refreshed after the extension gets enabled, and the ones that are either in the protected list or the white/blacklists). If you are using the JSON mode, the color should be orange and the user-agent string is shown in the tooltip area.

  15. Although the extension sets the userAgent key of the "navigator" object, though there are other keys that need to be replaced to fully spoof the navigator object when the browser type changes for instance from Firefox to Chrome or vice-versa

    This extension spoofs more than just the userAgent key. Currently "navigator.userAgent", "navigator.appVersion", "navigator.platform", "navigator.vendor", "navigator.product", and "navigator.oscpu" are all spoofed. If this is not enough for your case, go to the options page and define a custom new key for the parser object. Whenever a user-agent string is set that is matched to a key of this parser object, this extension bypasses the default parser and uses the object that is returned by the parser object. You can define as many keys as you would like. If there is a key that needs to be deleted, use the "[delete]" keyword as the value. All the keys that are defined in this object will be appended or replaced by the navigator object. This tool allows you to customize the navigator object the way you would like to

  16. What does this extension do with the port number in the hostname part of the URL (e.g. http://127.0.0.1:8000/)?

    In both white- and black-list modes, the extension considers the port portion when resolving the hostname. For this example, the hostname would be "127.0.0.1:8000". So to match with a hostname, you need to have the hostname written with the port part. For custom mode, the extension checks both hostnames with the port section and hostnames without the port section. Basically both "127.0.0.1:8000" and "127.0.0.1" rules match the http://127.0.0.1:8000/ pages.

  17. In the custom mode, I have several hostnames that need to have a single user-agent string. Can I group them all in the JSON object?

    Yes, you can create a key that is a comma-separated list of hostnames. See the example on the options page of the addon for more info.

  18. I need to create a user-agent string based on the browser's current user-agent string. Is it doable with this extension?

    Yes, this extension supports "${}" placeholders. Whatever is inside the "${}" expression will be passed by a sandboxed navigator object, and the result replaces the expression. To use the current user-agent string use ${userAgent} or to use the current platform use ${platform}. You can have multiple ${} expressions in your user-agent string definition too.

    As of version 0.4.3, the parser also supports a more complex syntax replacement ("${dot-separated.keys|ua-parser@custum-user-agent-string}") which uses a sandboxed parsed user-agent object which provides a more flexible variable replacement. For instance, to get the current browser version use "${browser.version|ua-parser}". You can also pass a user-agent string to this parser and then extract a key. For instance to extract the browser version from the "ua-parser" of Mozilla/5.0 ... user-agent string, use "${browser.version|ua-parser@Mozilla/5.0 ...}". Here is a sample output of the "ua-parser" object. You can use all these keys in your replacement queries:

    {
      "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36",
      "browser": {
        "name": "Chrome",
        "version": "85.0.4183.102",
        "major": "85"
      },
      "engine": {
        "name": "Blink",
        "version": "85.0.4183.102"
      },
      "os": {
        "name": "Mac OS",
        "version": "10.15.6"
      },
      "device": {},
      "cpu": {}
    }

  19. Is it possible to set a user-agent string in Firefox browser before it starts?

    Firefox supports a preference called "general.useragent.override" which accepts a user-defined UA string as input. If this preference is set, it will overwrite the default UA string of your browser. Note that this method does not overwrite other navigator properties, but it is the most reliable method to overwrite the actual string. If you are going to use a single UA string, it is recommended to set this preference as well as set the same UA string in this extension to protect all related navigator properties.

  20. Is it possible for an admin user to set the default user-agent string of this extension for all machines in the local network

    As of version 0.3.6, this extension supports reading a custom user-agent string from its managed storage. This way an admin user can use the operating system's policy center to adjust a custom user-agent string. This method works on all Chromium browsers as well as the Firefox browser. For instance to set a custom agent for Chrome browser on Mac OS, create "com.google.Chrome.extensions.bhchdcejhohfmigjafbampogmaanbfkg.plist" file in "/Library/Managed Preferences/" directory with the following content:

    <!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>ua</key>
        <string>this is me</string>
    </dict>
    </plist>
    You can validate this file by running "plutil com.google.Chrome.extensions.bhchdcejhohfmigjafbampogmaanbfkg.plist" terminal command. Now restart your browser and check "chrome://policy/" to make sure the policy is set and its level is "Mandatory". Note that if this managed preference is set, each time the browser starts, the extension uses this user-agent string, however the user can still alter it from the popup window until the next restart. As of version 0.4.1, there is a new managed preference that allows complete overwrite of all preferences by an admin user. Go to the options page of the extension and configure the extension the way it should work, then export settings while the shift key is pressed to generate a one-line JSON string. Now add a new key to the PLIST file. The key is "json" and value is the content of the exported file. This way an admin user can configure all computers on the network to have the predefined configurations. There is a special key on the JSON string to allow the admin user to overwrite all configurations on each browser restart which is called "json-forced". By default the preferences are set only once, however by setting this key to true, you can force the extension to set all the preferences when the browser starts.
    <!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
        <key>json</key>
        <string>JSON string (use Shift key while exporting to generate this string)</string>
    </dict>
    </plist>

  21. [Firefox Only] What is the meaning of the "Consider Containers" button on the popup interface?

    This option isolates the user-agent strings of different containers. The extension considers each container as an isolated land. The user is responsible to manually set a user-agent string for each container. If no user-agent is set for a container, the default one is used even if the default container of your browser has a custom user-agent string. This logic also applies to the window-based user-agent strings.

    The user-agent strings of containers are persistent across browser restarts. So the user needs to set the string once. To set a user-agent string for a container, open the interface on a tab that belongs to the container and press the "Apply (container)" button.

  22. When this extension is enabled, I get "Error 1010 Ray ID: * Access denied" on many websites including this page. What is the problem?

    Many websites check your user-agent string to make sure the request comes from a browser and it is not an automated request. So make sure you are using a valid user-agent string that represents a browser. To verify the currently used string, place your mouse over the toolbar button when you got this error on a website. The tooltip will display the used user-agent string. An example of an invalid user-agent string is the one that does not start with "Mozilla/5.0".

  23. What is the meaning of the "Sibling Hostnames" on the options page?

    This is a JSON array to keep groups of hostnames that are siblings to each other. As an example, "google.com" and "youtube.com" are siblings since both belong to the Alphabet Inc. All hostnames in the same group are considered to have a single user-agent string. The extension only tries to resolve a hostname once for the first request and then uses this hostname for all members of the group. This feature is useful if you are planning to use the "Custom Mode" with a random list, and the hostname is inside the "_" list too. This way, the extension randomly selects a user-agent string for this hostname once and uses this string for all subsequent requests from this hostname and all hostnames that are siblings.

  24. Is this extension sufficient to make sure my real user-agent string is not leaking?

    This extension does its best to protect your user-agent string from being revealed to web pages. However, it is also recommended to start your browser with the exact same user-agent string. Although most browsers support applying a custom user-agent, they are not going to alter other navigator properties. However, the actual user-agent is going to be spoof even if for any reason this extension failed at spoofing the string. On Firefox you can apply a custom user-agent string from about:config panel. Open this URL in a browser tab and search for general.useragent.overridepreference preference. Set the exact user-agent string as the one you have set for this extension, and restart your browser. For Chrome, you can create a desktop shortcut, and pass --user-agent="Your new user agent" argument to the executable.

Matched Content

Preview

Reviews

Please keep reviews clean, avoid improper language, and do not post any personal information. Also, please consider sharing your valuable input on the official store.

What's new in this version

Version--
Published--/--/--
Change Logs:
    Last 10 commits on GitHub
    Hover over a node to see more details

    Need help?

    If you have questions about the extension, or ideas on how to improve it, please post them on the  support site. Don't forget to search through the bug reports first as most likely your question/bug report has already been reported or there is a workaround posted for it.

    Open IssuesIssuesForks

    Recent Blog Posts