Use Google Chrome as a mobile phone Simulator

Source: Internet
Author: User

Many websites use User-Agent to determine the browser type. For a 3G mobile phone, the page content of the mobile phone is displayed. For a common browser, the page content is displayed.

Google Chrome can be easily used as a 3G mobile phone simulator. In Windows, enter the following command in "start"> "run" to start Google Chrome. Then, the browser of the corresponding mobile phone can be simulated to access the webpage of 3G mobile phone:

Google Android:

Chrome.exe
-- User-Agent = "Mozilla/5.0 (Linux; U; Android 2.2; en-US; Nexus One
Build/frf91) applewebkit/533.1 (khtml, like gecko) version/4.0 mobile
Safari/533.1 & quot"

Apple iPhone 4:

Chrome.exe
-- User-Agent = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X)
Applewebkit/534.46 (khtml, like gecko) mobile/9a405"

Apple iPad 2:

Chrome.exe -- User-Agent = "Mozilla/5.0 (IPAD; cpu OS 5_0_1 like Mac OS X) applewebkit/534.46 (khtml, like gecko) mobile/9a405"

Nokia n97:

Chrome.exe
-- User-Agent = "Mozilla/5.0 (symbianos/9.4; series60/5.0
NokiaN97-1/profiles 0.019; profile/MIDP-2.1 configuration/CLDC-1.1)
Applewebkit/525 (khtml, like gecko) browserng/7.1.18124"

Try to use Android, iPhone, and Nokia to access Nokia.

User-Agent: http://www.zytrax.com/tech/web/mobile_ids.html for more mobile phones

If you want to switch back to the normal browser mode, turn off all chrome browsers and restart. If you do not want to close the browser and switch back to the normal browser mode, access:

Chrome.exe -- User-Agent = "Mozilla/5.0 (Windows NT 6.1) applewebkit/535.7 (khtml, like gecko) Chrome/16.0.912.77 Safari/535.7" Updated: The following is the Youku judgment: Code :
VaR UA = Window. navigator. useragent; var href = Window. location. href; var Config = ['ipad ', 'android', 'iphone', 'ipod ']; var ISPC = true; For (VAR I = 0; I <config. length; I ++) {If (UA. indexof (config [I])! =-1) {ISPC = false; break ;}}

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.