Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mimicking iPhone user agent in Chrome? [duplicate]

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.

like image 316
Gadi A Avatar asked Mar 13 '11 10:03

Gadi A


People also ask

How do I spoof my Chrome user agent?

Just right click on any page and select your user-agent. This Chrome extension adds a toolbar button and a menu to switch between user-agents. Browse with our predefined user-agents or add your own user-agents. Changing User-Agent allows you to mimic, spoof or fake other browsers, devices or search engine spiders.

Can user agent be spoofed?

When a user requests a Web page, many websites check the type of browser being used in order to deliver a page specialized to render correctly. A lesser-known browser may spoof the user agent string and identify itself as a popular browser as long as it renders pages in the same manner.

What is AppleWebKit 537.36 Khtml like Gecko used for?

AppleWebKit/537.36 indicates what browser rendering engine is used. A rendering engine is what transforms HTML into an interactive webpage on the user's screen. The WebKit browser engine was developed by Apple and is primarily used by Safari, Chromium, and all other WebKit-based browsers. (KHTML, like Gecko).


2 Answers

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.

Chrome Developer Channel User Agent String

like image 145
aleemb Avatar answered Sep 26 '22 08:09

aleemb


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

like image 21
Rubinsh Avatar answered Sep 22 '22 08:09

Rubinsh