I\'m looking for a User Agent Switcher for Chrome.
Searching the Chrome Web Store does not come up with a simple switcher. I understand I can run the browser via command
Chrome Developer Tools (as of version 17+) have the ability to supply custom User-Agent
header
Bring up the developer tools by pressing f12
Look in the Console "drawer" (make it visible if not visible)
Click the Emulation tab in the console drawer.
Tick "Spoof user agent" and select an agent (or enter your own User-Agent string using the Other... option).
If you would like change the user agent in chrome you can not do it in the developer tools by checking the spoof user agent box in the emulation tab.
You can use webRequest API to create a chrome extension to modify the headers. When OP asked this question, this API may not exist or may be in experimental phase but now this api is quite stable.
chrome.webRequest.onBeforeSendHeaders.addListener(
function(details) {
for (var i = 0; i < details.requestHeaders.length; ++i) {
if (details.requestHeaders[i].name === 'User-Agent') {
details.requestHeaders[i].value = "Android_Browser" // Set your value here
break;
}
}
return { requestHeaders: details.requestHeaders };
},
{urls: ['<all_urls>']},
[ 'blocking', 'requestHeaders']
);
If you are looking for an already built extension, you can try Requestly where allows you to easily setup rules on website URLs or domains so that whenever that website is opened in browser, the User Agent is automatically overridden. The best part here is that you can simultaneously run multiple rules for multiple websites.
Most of the other options either allow to override User Agent for one browser tab or all of the tabs.
Here is a screenshot for your reference:
For more info, please visit blog: https://medium.com/@requestly_ext/switching-user-agent-in-browser-f57fcf42a4b5
To install, visit chrome store page: https://chrome.google.com/webstore/detail/requestly-redirect-url-mo/mdnleldcmiljblolnjhpnblkcekpdkpa
The extension is also available for Firefox. Visit http://www.requestly.in for details.
dunno but i found this:
http://www.hacker10.com/tag/internet-browser-headers/
saying:
Chrome browser, User-Agent Switcher extension: UPDATE: Addon erased from Chrome Store
and this where they say (as you mention) you can do it with a command line switch:
http://www.google.com/support/forum/p/Chrome/thread?tid=64e4e45037f55919&hl=en
for example, this is how to make chrome report itself as IE8.0 on my machine C:\Users\XXXX\AppData\Local\Google\Chrome\Application\chrome.exe --user-agent="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 3.5.30729)"
If you really just want to change the user agent for some sites or testing one little thing you could do to make it faster is create shortcuts to the site that includes the switch of user agent. at least that way its not so fiddly.
another silly idea: If you need exactly two user agents in chrome you could use canary build as one, I do this to have my apps account and google account open at the same time.
You can use this technique to change UA. It relies on changing the User-Agent header using the (still experimental) webRequest API
Update for 12/2019
Chrome's built-in user-agent switcher has moved several times, but it seems to have stayed in one place for the past few years. As of the time of writing, here's how you get it:
For the official documentation, which has (presumably) up-to-date instructions with screen grabs, go to: https://developers.google.com/web/tools/chrome-devtools/device-mode/override-user-agent
If you'd like a more convenient or feature-rich option, or if you're using a chromium browser other than Chrome, your best bet is a browser extension. Here are several that are up-to-date, and well-reviewed as of the time of writing:
Google also offers its own user-agent extension for Chrome (which does apparently work in some other chromium browsers, according to an Edge user):
A few notes on this last option: Although Google's UA switcher extension was updated only a few months ago (as of 12/19), reviews indicate that it might be somewhat out of touch when it comes to current browsers. It may also cause performance issues if you leave it enabled all the time. That said, this extension does work, and it is overall positively reviewed, so it could be a viable option if you want a convenient, albeit simple, UA switcher for Chrome.