December 12, 2011

Changing the User Agent, a New Google Chrome Feature

Changing the user agent of a browser is sometimes helpful if you're visiting a site that doesn't work well in your browser or if you're a developer and you want to test a site. Until recently, changing the user agent required installing an extension, opening about:config or adding a command-line parameter.

Now that browsers started to include powerful developer tools and even Internet Explorer has a built-in user agent editor, Chrome added a similar feature. It's only available in Chrome 17 (Dev Channel / Canary) right now.

Here's how to change the user agent:

1. open the Developer Tools (Ctrl+Shift+I on Windows/Linux, Command - Option - I on Mac OS X)
2. click the "settings" icon at the bottom of the window
3. check "override user agent" and select one of the options (Internet Explorer 7/8/9, Firefox 4/7 for Windows/Mac, iPhone, iPad and Nexus S running Android 2.3). You can also select "other" and enter a custom user agent.


{ via François. Thanks, Venkat. }

22 comments:

  1. https://plus.google.com/u/0/113127438179392830442/posts/946NsUZLGs7

    ReplyDelete
  2. My Chrome on Windows 7 is up-to-date and the only option I have under Network is "Disable cache".
    Also of note, the icon I have is a gear, not a wrench.

    ReplyDelete
  3. it's written Chrome 17 on dev channel ...

    So don't try with the latest build wich is 15 ...

    ReplyDelete
  4. Thanks Antoine, that is what I get for skimming.

    ReplyDelete
  5. New YouTube tests: http://www.actualidadgoogle.com/2011/12/14/youtube-esta-haciendo-tests-en-su-recien-estrenada-interfaz/

    ReplyDelete
  6. http://www.mayank110.blogspot.com/

    ReplyDelete
  7. The extension you're linking is for Firefox...

    ReplyDelete
  8. new news
    http://ipad-euro.com

    ReplyDelete
  9. Google Wins the Battle with Bing over a Place in Mozilla’s Homepage....read http://www.ztronicz.com/index.php?page=Google-Wins-the-Battle-with-Bing-over-a-Place-in-Mozillas-Homepage

    ReplyDelete
  10. Hi
    I recently published on the Chrome Web Store a Chrome 17.x extension which allows you to modify the User-Agent on a per-tab basis.
    Check out https://chrome.google.com/webstore/detail/fnbmdojpgjpmjjmnjdnbobcdhenmmgod

    ReplyDelete
  11. Well finally there is internal tools for that. Still some mobile sites detects resolution and scales the webpage for the screen resolution.

    ReplyDelete
  12. This does NOT work on the current public release of Google Chrome (16.0.9 as of 2012/01/09). Looks like a useful feature, can't wait until it's generally released, but until then I have to keep my chrome version the same as the real world...

    ReplyDelete
  13. Surprised Google took so long to include this feature. There is an extension available but it rarely works on my Ubuntu installation.

    ReplyDelete
  14. I've found that it works for the page it is on, but if you link to another page, the user-agent information is lost, and you get the desktop version of the site. Using Chrome 17.0.963.79

    ReplyDelete
  15. this is why firefox sucks and chrome rocks!!!

    ReplyDelete
    Replies
    1. This is why n00bs like you... eh... chupa. You should have read Anonymous' comment above before entering the firefox pissing contest. It doesn't work on newly accessed pages... I've checked through an html packet sniffer from my LAN card's buffer. Firefox still owns Chrome in this regard, you still need a different approach for Chrome to work.

      Delete
  16. I'd like to set the user agent as Googlebot. I tried to type in Googlebot2.1 and each of the three strings I could find:

    Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
    Googlebot/2.1 (+http://www.googlebot.com/bot.html)
    Googlebot/2.1 (+http://www.google.com/bot.html)

    None made it. What should I insert? Or should I do anything else than copying the string and pressing enter?

    ReplyDelete
  17. I am running GC 24 and changing uer agent does NOT work. I tell it to act as IE 9 but still the page gives me a warning.
    Suggestions anyone?

    ReplyDelete
  18. I am running GC 24. When I try the user agent IE 9 / 8 / 7 the page still gives me a warning.
    Any suggestions?

    ReplyDelete
  19. This article is very informative and easy to understand. Thank you for sharing!


    melbourne seo services

    ReplyDelete
  20. Hey There.
    I found this post from Google.
    This is a very good article.
    I’ll bookmark it and come back here next time.
    Nasi Kotak Jakarta

    ReplyDelete

Note: Only a member of this blog may post a comment.