The method for modifying the chrome user agent is true and valid.

Source: Internet
Author: User

How to modify chrome user agent:

By searching on the network, there are three ways to modify Chrome's usre agent, but some methods do not work.

  1. Add startup parameters to chrome (useful)
  2. Through the extension-User-Agent switcher (according to my test and online response, it does not work)
  3. Use Chrome's built-in Developer Tools to modify (and cannot work)

Method 1: add the -- User-Agent Startup parameter to chrome.This is a method that can work.

Right-click the chrome shortcut, and in the "shortcut"-"target" input box, modify it to be similar to the following:

C: \ Users \ XXX \ appdata \ Local \ google \ chrome \ Application \ chrome.exe -- User-Agent = "Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) applewebkit/420 + (khtml, like gecko) version/3.0 mobile/1a537a Safari/419.3"

In fact, the -- User-Agent parameter is added after c: \... Application \ chrome.exe. If you want to replace it with another parameter, modify the string between the double quotation marks "-- User-Agent =.

I believe most people do not understand the meaning of the string -- User-Agent =, I do not understand, but there is a special website to introduce different browsers, devices -- User-Agent parameters, http://www.useragentstring.com, the list of user agent strings page of the website lists the user agent parameters of various browsers on various platforms in detail, and provides a description of the parameters that are believed to be.

For example, I want to simulate chromeBlackberry 9000/OS version 5.0.0.1067/MIDP version 2.1Then, the string between the double quotation marks "-- User-Agent =" is changed to the following:

Blackberry9000/5.0.0.1067 profile/MIDP-2.1 configuration/CLDC-1.1 vendorid/302

Method 2: Extend-User-Agent switcher.Based on my tests and network reactions, this method does not work currently. (My environment: chrome 17 beta/Windows 7 64bit)

Method 3: Use Chrome's built-in development tools.Some versions of Chrome may not have Developer Tools. For specific settings, refer to the Tutorial: Use Chrome's built-in developer tool to change the user agent. However, I tested this method and the response on the network still did not work. (My environment: chrome 17 beta/Windows 7 64bit)

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.