When you browse a website using any web browser such as Google Chrome, a user agent string is read from your browser so it can determine how to render the page. For example, if you are browsing from your Android phone, by default it may have a user agent string like the following:
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
A website that reads this string may decide to display a mobile version of the site or a version that is specific to Android.
Google Chrome for Windows has a default string that looks like this:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/A.B (KHTML, like Gecko) Chrome/X.Y.Z.W Safari/A.B.
You can change this user agent string if you are developing a website and wish to test how your site looks under different strings. You may also change it if you wish to view the mobile version of a website from your desktop. Here’s how it’s done.
1. Select the wrench in the upper-right corner, then select Tools > Developer tools. You can also get to this screen by pressing Ctrl + Shift + I for Windows and Linux or Command + Option + I for Mac OS X.
2. Click the gear in the lower-right corner of the screen.
3. Check the Override User Agent box, then choose a selection. Toggle the setting to Other… to set your own custom user agent string.