Does --disable-web-security Work In Chrome Anymore?

217,987

Solution 1

Check your windows task manager and make sure you kill all chrome processes before running the command.

Solution 2

The new tag for recent Chrome and Chromium browsers is :

--disable-web-security --user-data-dir=c:\my\data

Solution 3

Try this :

Windows:

Run below commands in CMD to start a new instance of chrome browser with disabled security

Go to Chrome folder:

cd C:\Program Files (x86)\Google\Chrome\Application

Run below command:

chrome.exe --disable-web-security --user-data-dir=c:\my-chrome-data\data

MAC OS:

Run this command in terminal:

open -n -a /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --args --user-data-dir="/tmp/chrome_dev_sess_1" --disable-web-security

Hope this will help both Windows & Mac users!

Solution 4

This flag worked for me at v30.0.1599.101 m enter image description here

The warning "You are using an unsupported command-line flag" can be ignored. The flag still works (as of Chrome v86).

Solution 5

This should work. You may save the following in a batch file:

TASKKILL /F /IM chrome.exe
start chrome.exe --args --disable-web-security
pause
Share:
217,987

Related videos on Youtube

Fields
Author by

Fields

Updated on March 01, 2022

Comments

  • Fields
    Fields about 1 year

    I'm trying to do a simple test without changing any server-side code involving a cross-domain AJAX call, and I was wondering if it's possible to use --disable-web-security anymore. It seems to not work on Chrome 28.

    I haven't used it since Chrome version 21; has this feature been dropped?

    • Fields
      Fields almost 10 years
      That's from 2011 and also discusses Chrome 21-23. Their solution of killing all processes didn't work; I tried before posting. A workaround would be to download a very old version of Chrome, but I'm wondering if it's still a feature in Chrome 28.
  • Fields
    Fields over 9 years
    That did it. I just forgot to kill one chrome process.
  • Mukus
    Mukus almost 8 years
    Says invalid agrument start
  • Zahran
    Zahran almost 8 years
    Please try this in a file batch (I should have introduced a new line before start): TASKKILL /F /IM chrome.exe start chrome.exe --args --disable-web-security pause
  • Zahran
    Zahran almost 8 years
    I am not sure why stackoverflow does not allow me to introduce new line. The above script must have a new line before start and before pause.
  • Mukus
    Mukus almost 8 years
    I did it in a batch file. No worries though. I can open up task manager and kill the process tree for chrome
  • Phylogenesis
    Phylogenesis over 7 years
    A little late, but I've edited your answer as you wanted.
  • Mr Br
    Mr Br about 7 years
    This is working, using only --disable-web-security doesn't.
  • GrandmasterB
    GrandmasterB about 7 years
    On the second param, be sure to specify a path, like --user-data-dir=c:\my\data
  • Cripto
    Cripto about 6 years
    So the warning stating "unsupported command" can be ignored? It's being supported?
  • a.barbieri
    a.barbieri over 5 years
    let's say I want to enable web security again. How can I do it?
  • inf3rno
    inf3rno over 4 years
    With the current Chrome it doesn't matter. I am browsing with enabled security while e2e testing with disabled security in a different window using Karma...
  • Jyot Mankad
    Jyot Mankad over 3 years
    Mac one does not work. Almost tried everything after first trying the above one. --disable-site-isolation-trials -> does not work --disable-gpu -> does not work Tried opera also -> no luck
  • CodeChanger
    CodeChanger over 3 years
    Which MAC OS you have ?
  • SuperUberDuper
    SuperUberDuper almost 3 years
    got a mac version?
  • SuperUberDuper
    SuperUberDuper almost 3 years
    im on catolina, any luck?
  • Coderer
    Coderer almost 3 years
    The user-data-dir flag is now mandatory when trying to disable web security, because it effectively launches a second Chrome "profile". You can run a normal ("with" web security) profile by just launching Chrome with no command line flags, and this "good" session can run at the same time as the unprotected session.
  • Coderer
    Coderer almost 3 years
    In case anybody finds this in 2020 and beyond: this is no longer valid. disable-web-security now has no effect if you don't also specify user-data-dir -- you can't disable web security on your default profile.
  • SujithaW
    SujithaW almost 3 years
    add a " in front for the is not a recognized command error
  • kay
    kay over 2 years
    Anno 2020, as of Chrome 86, yes it works. The message can be ignored.
  • Kay V
    Kay V almost 2 years
    Mac command works for me on Big Sur. Not sure if it's a factor, but Chrome was not running when I entered the command. For what it's worth: Chrome then acted as if it were being installed for the first time.
  • Mayank Kataria
    Mayank Kataria about 1 year
    How to do in Linux?