问题
I'm tinkering with a phpbb mod which adds a skin for mobile phones, and to work on it in my computer I want to mimic an iphone. In Firefox I manage to do this using the "user agent switcher" extension which comes with built-in "iphone" feature:
https://addons.mozilla.org/en-us/firefox/addon/user-agent-switcher/
However, in Chrome (which I prefer) I cannot make this happen. I downloaded what seemed to be the relevant extension:
https://chrome.google.com/extensions/detail/aafciojnlamllgpkpdkbamkfgbofhgcj?hl=he
It doesn't come with a built-in iPhone mode, so I added the following user agent:
"Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3"
However, this seems to have absolutely no effect - the pages load normally and not in the mobile skin.
回答1:
You can change chrome user agent by running it from command line:
chrome.exe --user-agent="User Agent String"
check out This Page for more information
回答2:
With the latest release in the Chrome Dev Channel (version 18) you can browse to developer tool settings and change the user agent string directly without needing any plugins or command line options.
First download Chrome from the developer channel, restart it, CTRL+SHIFT+I and click settings on bottom right. You should now be able to select the UA string.

回答3:
The User-Agent Switcher for Chrome works nicely, I just tested it out.
回答4:
I downloaded the portable version of chrome and created a custom shortcut to it to always have a mobile browser.
F:_SOE\Apps\GoogleChromePortable\GoogleChromePortable.exe --user-agent="Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543 Safari/419.3"
回答5:
There is now the Ultimate User Agent Switcher in the Chrome Webstore. It's awesome!
回答6:
I don't think chrome can do that but using one of the proxy out there you would be able to do it like privoxy
来源:https://stackoverflow.com/questions/5288733/mimicking-iphone-user-agent-in-chrome