Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently found out that I can disable Chrome "web security" using a command line argument, making JavaScript development easier. The issue is that I can't seem to run more than one "instance" of Chrome at a time. If I chrome.exe --disable-web-security while Chrome is alread running, it just opens a new window within the running instance and ignores my command line arguments. I can close Chrome completely and relaunch it with the above command line argument, but then all my windows will be running without web security, which is a bad thing for general browser usage.

So to summarize the question: Is it possible to start an instance of Chrome with the --disable-web-security flag while a normal Chrome instance is running?

Note: I suspect the answer may lay within the Chrome command line switches, but there are just... so many...

share|improve this question
up vote 30 down vote accepted

I found a similar question on ask ubuntu. Apparently you can tell Chrome to start a new session by passing it a new user data directory. This means I can now run this command:

chrome.exe --user-data-dir="C:/Chrome dev session" --disable-web-security

And a new Chrome window opens with web security disabled. Yay!

Note: This means that window drag & drop won't work between these two windows.

share|improve this answer
You can tell Chrome to start a new session by passing it a new user data directory. Yup; in fact, it does this with most switches; an “instance” is Chrome run with a unique set of arguments (in any order). It may not behave exactly the same now, but user-data-dir at a minimum will still trigger a new instance. Window drag & drop won't work between these two windows. Nope; as far as Chrome is concerned, they are from two different browsers/apps. Also be wary of handlers: running an .htm file or bookmark will open in an instance with the args specified in the type registration. – Synetech May 13 '13 at 3:35
Is there a way to do this in Mac OS X? – aug Jul 22 '14 at 17:39
@aug: I can't test this, but try (from the terminal): open -a /Applications/ --user-data-dir="/tmp/chrome_dev_session" --disable-web-security. I'm assuming here that OSX has a "/tmp/" directory, you can change the path if it doesn't. – Hubro Jul 22 '14 at 17:48
Hmmm didn't work. I played around with the file path too @_@ tried things like $TMPDIR and such. Might play with it more later when I get the chance. – aug Jul 22 '14 at 17:58
@CoryMawhorter This is already in an answer below – Hubro Aug 27 '15 at 4:44

Close all the opened window in chrome browser. If multiple window are opend close everthing seperately. then You can open chrome using following code in "RUN"

chrome.exe --allow-file-access-from-files --disable-web-security
share|improve this answer

Responding to @aug and @hubro's comments, you can use the open command's -n flag to open a new instance of an app via Mac OS X's Terminal:

open -n -a /Applications/

You can add any flags that you want to use (like --disable-web-security) onto the end of that command.

share|improve this answer
This doesnt seem to create a new instance. Because when I try it in the old instance (with security not disabled) I can do cors – tobbe Aug 20 '14 at 11:40
Huh, you're right! The man page of the open command does indicate that the -n flag is for opening a new instance of an application, but it seems like Chrome & Chromium have some kind of logic preventing multiple instances of the application from being opened. The command works as is for Safari, for example. – arielkirkwood Sep 2 '14 at 19:45
Since this answer is incorrect, can you delete it? – Noel Yap Oct 20 '15 at 21:11
I don't have a mac, but I heard that it works if you include the --user-data-dir option also: open -n -a /Applications/ --user-data-dir="/tmp/chrome_dev_session" --disable-web-security. Please give that a try. – Sam Watkins Jan 25 at 1:09

For mac:

/Applications/Google\\ Chrome --user-data-dir="/tmp/chrome_dev_session" --disable-web-security

Replace with your particular path to chrome if necessary.

share|improve this answer

You can use some fork of Chrome as a second browser, like Iron or Dragon. Maybe a portable instance of Chrome would work too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.