Is it possible to have a Google Chrome shortcut use a different user agent than an existing Chrome window?

9

3

I am specifying a custom user agent in Google Chrome in order to access a legacy web site on my company's intranet (the site is needlessly requiring IE). I created an application shortcut for the site and added the --user-agent parameter to the shortcut.

If I launch this shortcut without Chrome already running, things work fine. However, if I launch the application shortcut when another Chrome window is already open, the --user-agent parameter is ignored and the normal user-agent is used.

So, it appears that whatever user agent string is used when the first Chrome window is opened is what will be used for all future windows or application shortcuts. Is there any way to get around this behavior?

arathorn

Posted 2009-07-19T19:14:51.137

Reputation: 8 559

It's probably just a bug, you may want to submit it as such. – Brad Gilbert – 2009-07-19T19:24:29.820

Answers

12

What you can do is create multiple profiles. This means that windows will not be shared, and likewise with favorites, cache, home-screen content, cookies, etc., but you'll be able to make your shortcut work the way you wanted it to.

First, follow the steps in this article here to create a secondary profile for Google Chrome: Create Separate Profiles in Google Chrome for Family Members and Stay Extra Safe.

Secondly, modify the shortcut by tucking on your --user-agent parameter. For instance, here's the command line I used to test:

"path\to\chrome.exe" --user-data-dir="..\User Data\Test" --user-agent="Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)"

Now you can double-click on your regular Chrome shortcut, and this new shortcut, and each will open their windows in distinct sessions, with their own user agents.

Lasse V. Karlsen

Posted 2009-07-19T19:14:51.137

Reputation: 3 196

0

The application window may be picking up and sharing the session started by your other window. If you aren't attached to browsing history etc. you could try tagging your shortcut with the --incognito parameter as well. Worth a shot!

BenA

Posted 2009-07-19T19:14:51.137

Reputation: 5 245

Great idea, but didn't work. :( – arathorn – 2009-07-20T15:48:51.870